+ private Ini loadOrCreateDatabaseIni(Path path, String databaseDriverId)
+ throws InvalidFileFormatException, IOException
+ {
+ File f = path.toFile();
+ Ini dbIni = Files.isRegularFile(path) ? new Ini(f) : new Ini();
+ String iniId = dbIni != null ? dbIni.get("driver", "id") : null;
+ if (iniId == null) {
+ dbIni.put("driver", "id", databaseDriverId);
+ dbIni.store(f);
+ }
+ return dbIni;
+ }