public static String relativizePath(File f1, File f2) throws IOException {
		String parentPath = f1.getCanonicalPath().replace('\\', '/');
		String otherPath = f2.getCanonicalPath().replace('\\', '/');
		if (parentPath.equals(otherPath)) {
			return null;
		}

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

		if (!otherPath.startsWith(parentPath)) {
			return null;
		}

		String childPath = otherPath.substring(parentPath.length());
		return childPath;
	}
Returns the portion of the second file that trails the full path of the first file.  If
the paths are the same or unrelated, then null is returned.

<P>For example, given, in this order, two files with these paths
 <code>/a/b</code> and <code>/a/b/c</code>, this method will return 'c'.

@param f1 the parent file
@param f2 the child file
@return the portion of the second file that trails the full path of the first file; null as
described above
@throws IOException if there is an error canonicalizing the path
Ghidra/Framework/Utility/src/main/java/utilities/util/FileUtilities.java