DomainFile getFileByID(String fileID) {
		TaskMonitor monitor = projectData.getProjectDisposalMonitor();
		String filePath = fileIdToPathIndex.get(fileID);
		if (filePath != null) {
			return projectData.getFile(filePath);
		}

		boolean unsupportedOperation = false;

		IOException exc = null;
		try {
			FolderItem item = projectData.getPrivateFileSystem().getItem(fileID);
			if (item != null) {
				return projectData.getFile(item.getPathName());
			}
		}
		catch (UnsupportedOperationException e) {
			unsupportedOperation = true;
		}
		catch (IOException e) {
			exc = e;
		}

		try {
			FolderItem item = projectData.getVersionedFileSystem().getItem(fileID);
			if (item != null) {
				return projectData.getFile(item.getPathName());
			}
			return null;
		}
		catch (UnsupportedOperationException e) {
			unsupportedOperation = true;
		}
		catch (IOException e) {
			exc = e;
		}

		if (unsupportedOperation) {
			// if file-system get item by File-ID unsupported use brute force search
			try {
				return findFileByID(projectData.getRootFolderData(), fileID, monitor);
			}
			catch (IOException e) {
				exc = e;
			}
		}

		if (exc != null) {
			Msg.error(this, "File index lookup failed due to error: " + exc.getMessage());
		}
		return null;
	}
Helper class to maintain mapping of fileID's to DomainFile's.
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/DomainFileIndex.java