public static boolean isPathContainedWithin(File potentialParentFile, File otherFile) {
		try {
			String parentPath = potentialParentFile.getCanonicalPath().replace('\\', '/');
			String otherPath = otherFile.getCanonicalPath().replace('\\', '/');
			if (parentPath.equals(otherPath)) {
				return true;
			}

			if (!parentPath.endsWith("/")) {
				parentPath += "/";
			}

			return otherPath.startsWith(parentPath);
		}
		catch (IOException e) {
			return false;
		}
	}
Returns true if the given <code>potentialParentFile</code> is the parent path of
the given <code>otherFile</code>, or if the two file paths point to the same path.

@param potentialParentFile The file that may be the parent
@param otherFile The file that may be the child
@return boolean true if otherFile's path is within potentialParentFile's path
Ghidra/Framework/Utility/src/main/java/utilities/util/FileUtilities.java