static DomainFolder parseDomainFolder(Project project, String path) {
		if (path == null) {
			return null;
		}
		path = path.trim();
		// Add the slash to make it an absolute path
		if (path.isEmpty() || path.charAt(0) != FileSystem.SEPARATOR_CHAR) {
			path = FileSystem.SEPARATOR_CHAR + path;
		}
		DomainFolder df = project.getProjectData().getFolder(path);
		if (df != null) {
			return df;
		}
		return null;
	}
Base class for either project file chooser or project folder chooser
Ghidra/Features/Base/src/main/java/ghidra/features/base/values/AbstractProjectBrowserPanel.java