static void checkValidFilename(String path) throws InvalidInputException {
		String filename = FilenameUtils.getName(path);

		for (int i = 0; i < filename.length(); i++) {
			char c = filename.charAt(i);
			if (!LocalFileSystem.isValidNameCharacter(c)) {
				throw new InvalidInputException(
					"'" + filename + "' contains the invalid character: \'" + c +
						"\' and can not be imported (full path: " + path + "). Please rename.");
			}
		}
	}
Checks to make sure the given file contains only valid characters in its name.

@param path The path of the file to check.
@throws InvalidInputException if the given file path contains invalid characters in it.
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessAnalyzer.java