code: public static boolean isAncestor(Path possibleAncestor, Path fullPath) {
      return !relativizePath(fullPath, possibleAncestor).equals(getPathWithoutSchemeAndAuthority(fullPath));
    }
docs: Checks whether possibleAncestor is an ancestor of fullPath.
  @param possibleAncestor Possible ancestor of fullPath.
  @param fullPath path to check.
  @return true if possibleAncestor is an ancestor of fullPath.