Example #1
0
  private File fixPath(File dir, StoreFactory sf) {
    try {
      fileSystem.mkdirs(dir);
    } catch (IOException e) {
      throw new UnderlyingStorageException(
          "Unable to create directory path[" + storeDir + "] for Neo4j kernel store.");
    }

    File store = new File(dir, NeoStore.DEFAULT_NAME);
    if (!fileSystem.fileExists(store)) {
      sf.createNeoStore(store).close();
    }
    return store;
  }