private boolean refreshUnpacking(TaskMonitor monitor) throws CancelledException, IOException {
		monitor.setMessage("Waiting...");
		if (!dbDir.isDirectory()) {
			throw new IOException("PackedDatabase has been disposed");
		}
		if (packedDbLock != null) {
			lock(packedDbLock, true, true);
		}
		try {
			if (!packedDbFile.isFile()) {
				throw new FileNotFoundException("File not found: " + packedDbFile);
			}
			long modTime = packedDbFile.lastModified();
			if (isCached) {
				CachedDB entry = PackedDatabaseCache.getCache().getCachedDBEntry(packedDbFile);
				if (entry != null && entry.getLastModified() == modTime) {
					return true;
				}
			}
			if (dbTime == modTime) {
				return true;
			}

//			File[] files = dbDir.listFiles();
//			for (int i = 0; i < files.length; i++) {
//				if (!files[i].delete()) {
//					return false;
//				}
//			}
//			currentVersion = 0;

			monitor.setMessage("Unpacking file...");

			refreshDatabase(bfMgr, -1, packedDbFile, monitor);
			dbTime = modTime;
			if (isCached) {
				PackedDatabaseCache.getCache().updateLastModified(packedDbFile, modTime);
			}
//			currentVersion = 1;

		}
		finally {
			if (packedDbLock != null) {
				packedDbLock.removeLock();
			}
		}
		return true;
	}
Refresh the temporary database from the packed file if it has been updated
since the previous refresh.
@param monitor unpack monitor
@return True if refresh was successful or not required.
False may be returned if refresh failed due to unpacked files being in use.
@throws IOException if IO error occurs
@throws CancelledException if unpack is cancelled
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PackedDatabase.java