public static LocalManagedBufferFile createDatabase(File dbDir, DBFileListener dbFileListener,
			int bufferSize) throws IOException {
		PrivateDatabase db = new PrivateDatabase(dbDir, dbFileListener);
		boolean success = false;
		try {
			LocalManagedBufferFile bfile = new LocalManagedBufferFile(bufferSize, db.bfMgr, -1);
			success = true;
			return bfile;
		}
		finally {
			if (!success && db.dbDirCreated) {
				deleteDir(dbDir);
			}
		}
	}
Create a new database and provide the initial buffer file for writing.
@param dbDir
@param bufferSize
@return initial buffer file
@throws IOException
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PrivateDatabase.java