sS disk_findMountPoint(File f, LS mountPoints, O... _) { ret f == null ? null : disk_findMountPoint(f.getPath(), mountPoints, _); } sS disk_findMountPoint(S f, LS mountPoints, O... _) { if (f == null) null; S path = addFileSep(getCanonicalPath(f)); if (boolPar debug(_)) print("Canonical: " + path); ret bestByScoreFunction(mountPoints, mp -> startsWith(path, addFileSep(mp)) ? l(mp) : null); }