private void checkDbDir() throws IOException {

		String[] fileList = dbDir.list();
		if (fileList == null) {
			throw new IOException("Database directory not found: " + dbDir);
		}

//		boolean bufferFileFound = false;
		boolean versionFileFound = false;

		for (int i = 0; i < fileList.length; i++) {
			// Identify files of interest
			String fname = fileList[i];
			if (fname.endsWith(LocalBufferFile.BUFFER_FILE_EXTENSION)) {
				if (fname.startsWith(DATABASE_FILE_PREFIX)) {
//					bufferFileFound = true;
				}
				else if (fname.equals(CUMULATIVE_CHANGE_FILENAME)) {
// TODO: This check is not reliable
// If the detabase is checked-out and not yet modified, this file will not yet exist
					isCheckOutCopy = true;
				}
				else if (fname.startsWith(VERSION_FILE_PREFIX)) {
					versionFileFound = true;
				}
			}
		}

//		if (!bufferFileFound) {
//			throw new IOException("Bad database directory: " + dbDir);
//		}
		if (!isVersioned && versionFileFound) {
			updateAllowed = false;
		}
		if (isVersioned && isCheckOutCopy) {
			throw new IOException("Versioned Database also appears to be a checkout copy");
		}
	}
Returns the length of this domain file.  This size is the minimum disk space
used for storing this file, but does not account for additional storage space
used to tracks changes, etc. 
@return file length
@throws IOException thrown if IO or access error occurs
Ghidra/Framework/DB/src/main/java/db/Database.java