- if (path.exists() && !path.isDirectory())
- throw new IOException("Could not create index directory " + path + ", a file by that name already exists");
- path.mkdirs();
- if (!path.exists())
- throw new IOException("Could not create index directory " + path + " for an unknown reason");
- if (!path.isDirectory())