code: public static String getParent(String path) throws InvalidPathException {
      String cleanedPath = cleanPath(path);
      String name = FilenameUtils.getName(cleanedPath);
      String parent = cleanedPath.substring(0, cleanedPath.length() - name.length() - 1);
      if (parent.isEmpty()) {
        // The parent is the root path.
        return AlluxioURI.SEPARATOR;
      }
      return parent;
    }
docs: Gets the parent of the file at a path.
  
  @param path The path
  @return the parent path of the file; this is "/" if the given path is the root
  @throws InvalidPathException if the path is invalid