code: private List<URIStatus> getPathStatuses(AlluxioURI path, FileSystem fs) throws Exception {
      // Depth-first search to to find all files under path.
      Stack<AlluxioURI> pathsToConsider = new Stack<>();
      pathsToConsider.add(path);
      List<URIStatus> allStatuses = Lists.newArrayList();
      while (!pathsToConsider.isEmpty()) {
        AlluxioURI nextPath = pathsToConsider.pop();
        URIStatus status = fs.getStatus(nextPath);
        allStatuses.add(status);
        if (status.isFolder()) {
          List<URIStatus> childStatuses = fs.listStatus(nextPath);
          for (URIStatus childStatus : childStatuses) {
            if (childStatus.isFolder()) {
              pathsToConsider.push(new AlluxioURI(childStatus.getPath()));
            } else {
              allStatuses.add(childStatus);
            }
          }
        }
      }
      return ImmutableList.copyOf(allStatuses);
    }
docs: Returns {@link URIStatus} for all paths under the specified path, including the path itself.
  
  The statuses will be listed in the order they are visited by depth-first search.
  
  @param path the target path
  @return a list of the {@link URIStatus} for all paths under the given path
  @throws Exception if an exception occurs