private void updateDirAndSelectFile(File directory, File fileToSelect, boolean forceUpdate,
			boolean addToHistory) {
		if (MY_COMPUTER.equals(directory)) {
			updateMyComputer(forceUpdate, addToHistory);
			setSelectedFileAndUpdateDisplay(fileToSelect);
			return;
		}
		if (RECENT.equals(directory)) {
			updateRecent(addToHistory);
			return;
		}

		if (directory == null) {
			if (isDirectory(fileToSelect)) {
				// this could happen if the selected file is a root directory
				updateDirOnly(fileToSelect, forceUpdate, addToHistory);
			}
			return; // nothing to select
		}

		// no file to select
		if (fileToSelect == null) {
			updateDirOnly(directory, forceUpdate, addToHistory);
			return;
		}

		worker.schedule(new UpdateDirectoryContentsJob(directory, fileToSelect, addToHistory));
	}
Updates the given directory and selects the given file.

@param directory The directory to load and update
@param fileToSelect The file to select after updating the dir (may be null).
@param forceUpdate True signals to force the directory to update, even if it is the current
       directory
@param addToHistory True signals to add the given directory to the navigation history
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java