docs: @CheckForNull
    public String relativePath(Path dir, Path file) {
      Path baseDir = dir.normalize();
      Path path = file.normalize();
      if (!path.startsWith(baseDir)) {
        return null;
      }
      try {
        Path relativized = baseDir.relativize(path);
        return FilenameUtils.separatorsToUnix(relativized.toString());
      } catch (IllegalArgumentException e) {
        return null;
      }
    }