public File parseDirectory(String val) {
		File dir = new File(val);
		if (!dir.isDirectory()) {
			throw new IllegalArgumentException("Invalid directory: " + dir);
		}
		return dir;
	}
Parses a directory from a string.

@param val The string to parse.
@return The directory that was parsed from the string.
@throws IllegalArgumentException if the parsed value is not a valid directory.
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java