docs: public static File resolveAbsolutely(String pathToResolve, String baseDir) {
          // TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to "/" and a relative path of "../../foo".
          File fileToResolve = new File(pathToResolve);
  
          if (fileToResolve.isAbsolute()) {
              return fileToResolve;
          }
  
          if (baseDir == null) {
              throw new IllegalArgumentException("Cannot resolve relative path '" + pathToResolve + "' with a " +
                      "null base directory.");
          }
  
          File baseDirAsFile = new File(baseDir);
          if (!baseDirAsFile.isAbsolute()) {
              throw new IllegalArgumentException("Base directory '" + baseDirAsFile + "' must be absolute");
          }
  
          final File toCanonicalize = new File(baseDirAsFile, pathToResolve);
          try {
              return toCanonicalize.getCanonicalFile();
          } catch (IOException e) {
              throw new RuntimeException("Unable to canonicalize the file path '" + toCanonicalize + "'");
          }
      }