public static void validateDirectoryPath(String directory) {
		if (StringUtils.isBlank(directory)) {
			throw new IllegalArgumentException("Blank directory path");
		}
		URI uri;
		try {
			uri = new URI(FILE_SCHEME, null, directory, null).normalize();
		}
		catch (URISyntaxException e) {
			throw new IllegalArgumentException(e.getMessage());
		}
		String normalizedPath = uri.getPath();
		if (!normalizedPath.endsWith("/")) {
			throw new IllegalArgumentException(directory + " is not a directory path");
		}
		if (!directory.equals(normalizedPath)) {
			throw new IllegalArgumentException(directory + " is not normalized");
		}
		return;
	}
Throws an {@link IllegalArgumentException} if {@code directory} is not
a valid, normalized directory path (with forward slashes).
@param directory path to validate
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/sourcemap/UserDataPathTransformer.java