public static LocalManagedBufferFile createVersionedDatabase(File dbDir, int bufferSize,
			VersionedDBListener verDBListener, long checkoutId) throws IOException {
		VersionedDatabase db = new VersionedDatabase(dbDir, verDBListener, true);
		boolean success = false;
		try {
			LocalManagedBufferFile bfile =
				new LocalManagedBufferFile(bufferSize, db.bfMgr, checkoutId);
			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/VersionedDatabase.java