public DomainFile parseDomainFile(String val) {
		// Add the slash to make it an absolute path
		if (!val.isEmpty() && val.charAt(0) != FileSystem.SEPARATOR_CHAR) {
			val = FileSystem.SEPARATOR_CHAR + val;
		}

		DomainFile df = state.getProject().getProjectData().getFile(val);
		if (df != null) {
			return df;
		}
		throw new IllegalArgumentException("Invalid DomainFile: " + val);
	}
Parses a DomainFile from a string.

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