docs: public static String getRelativePath(File baseDir, File file, boolean... forceURLPath)
    {
      Params.notNull(baseDir, "Base directory");
      Params.notNull(file, "File");
      Params.notNullOrEmpty(baseDir, "Base directory");
      Params.notNullOrEmpty(file, "File");
  
      List<String> baseDirPathComponents = getPathComponents(baseDir.getAbsoluteFile());
      if(baseDirPathComponents.size() > 0) {
        int lastIndex = baseDirPathComponents.size() - 1;
        if(baseDirPathComponents.get(lastIndex).equals(".")) {
          baseDirPathComponents.remove(lastIndex);
        }
        else if(baseDirPathComponents.get(lastIndex).equals("..")) {
          if(baseDirPathComponents.size() < 2) {
            throw new BugError("Invalid base directory for relative path. It ends with '..' but has no parent directory.");
          }
          baseDirPathComponents.remove(baseDirPathComponents.size() - 1);
          baseDirPathComponents.remove(baseDirPathComponents.size() - 1);
        }
      }
      List<String> filePathComponenets = getPathComponents(file.getAbsoluteFile());
      List<String> relativePath = new ArrayList<String>();
  
      int i = 0;
      for(; i < baseDirPathComponents.size(); i++) {
        if(i == filePathComponenets.size()) break;
        if(!baseDirPathComponents.get(i).equals(filePathComponenets.get(i))) break;
      }
      for(int j = i; j < baseDirPathComponents.size(); j++) {
        relativePath.add("..");
      }
      for(; i < filePathComponenets.size(); i++) {
        relativePath.add(filePathComponenets.get(i));
      }
  
      return Strings.join(relativePath, forceURLPath.length > 0 && forceURLPath[0] ? '/' : File.separatorChar);
    }