public static ResourceFile findSourceDirectoryContaining(ResourceFile sourceFile) {
		for (ResourceFile sourceDir : getScriptSourceDirectories()) {
			if (FileUtilities.relativizePath(sourceDir, sourceFile) != null) {
				return sourceDir;
			}
		}
		Msg.error(GhidraScriptUtil.class,
			"Failed to find script in any script directory: " + sourceFile.toString());
		return null;
	}
Search the currently managed source directories for the given script file.

@param sourceFile the source file
@return the source directory if found, or null if not
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScriptUtil.java