public static File resolveFileCaseInsensitive(File f) {
		if (f.exists()) {
			return f;
		}

		File fParent = f.getParentFile();
		String fName = f.getName();
		File tmp = new File(fParent, fName.toLowerCase());
		if (tmp.exists()) {
			return tmp;
		}
		tmp = new File(fParent, fName.toUpperCase());
		if (tmp.exists()) {
			return tmp;
		}

		File[] fileList = fParent.listFiles();
		if (fileList != null) {
			for (File otherFile : fileList) {
				if (otherFile.getName().equalsIgnoreCase(fName)) {
					return otherFile;
				}
			}
		}
		return f;
	}
Ensures the specified {@link File} points to a valid existing file,
regardless of case match of the file's name.
<p>
Does not fixup any case-mismatching of the parent directories of the specified
file.
<p>
If the exact filename already exists, it is returned unchanged, otherwise
an all-lowercase version of the filename is probed, and then an all-uppercase
version of the filename is probed, returning it if found.
<p>
Finally, the entire parent directory of the specified file is listed, and the first
file that matches, case-insensitively to the target file, is returned.
<p>
If no file is found that matches, the original File instance is returned.
<p>
See also {@link #existsAndIsCaseDependent(ResourceFile)}.

@param f File instance
@return File instance pointing to a case-insensitive match of the File parameter
Ghidra/Framework/Utility/src/main/java/utilities/util/FileUtilities.java