code: public static boolean hasRoot(String path, String root) {
          String p = cleanPath(path);
          String r = cleanPath(root);
          return p.equals(r)
                 || r.equals(cleanPath(ROOT.getPath()))
                 || p.startsWith(r + SEPARATOR);
      }
docs: @return true if the given path starts with the given root
  
  @param path test path
  @param root root