class MongoSchemaFileStore implements MongoSchemaStore {

    static void validateDirectory(File file) throws IOException {
        if (!file.exists() && !file.mkdirs()) {
            throw new IOException("Schema store directory does not exist and could not be created: " + file.getAbsolutePath());
        }
        if (file.isDirectory()) {
            // File.canWrite() doesn't report as intended for directories on
            // certain platforms with certain permissions scenarios.  Will
            // instead we verify we can create a file then delete it.
            if (!File.createTempFile("test", ".tmp", file).delete()) {
                throw new IOException("Unable to write to schema store directory: " + file.getAbsolutePath());
            }
        } else {
            throw new IOException("Specified schema store directory exists but is not a directory: " + file.getAbsolutePath());
        }
    }

    public  MongoSchemaFileStore(String uri);
    public  MongoSchemaFileStore(URI uri);
    public  MongoSchemaFileStore(File file);

}