code: public String lookupRelativeNativePath(PathImpl path)
    {
      String thisNative = getNativePath();
      String pathNative = path.getNativePath();
  
      if (pathNative.startsWith(thisNative)) {
        int i = thisNative.length();
  
        while (i < pathNative.length()) {
          if (pathNative.charAt(i) != getFileSeparatorChar())
            break;
  
          i++;
        }
  
        return i == pathNative.length() ? "" : pathNative.substring(i);
      }
      else
        return pathNative;
    }
docs: Returns a native path relative to this native path if the passed path
  is relative to this path, or an absolute path if the passed path is not
  relative to this path.