private boolean verifyRootOutputDir(String destDirName) {
		boolean isSameName = destDirName.equals(rootOutputDirectory.getName());
		File newRootOutputDir =
			isSameName ? rootOutputDirectory : new File(rootOutputDirectory, destDirName);
		if (newRootOutputDir.isFile()) {
			Msg.showError(this, parentComponent, "Export Destination Error",
				"Unable to export to " + newRootOutputDir + " as it is a file");
			return false;
		}
		if (newRootOutputDir.exists() && newRootOutputDir.list().length > 0) {
			int answer = OptionDialog.showYesNoDialog(parentComponent, "Verify Export Destination",
				newRootOutputDir.getAbsolutePath() + "\n" + "The directory is not empty." + "\n" +
					"Do you want to overwrite the contents?");
			if (answer == OptionDialog.NO_OPTION) {
				return false;
			}
		}
		rootOutputDirectory = newRootOutputDir;
		return true;
	}
{@link Task} that recursively extracts all files from a {@link GFileSystem} directory
and writes them to a local filesystem.
Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/tasks/GFileSystemExtractAllTask.java