code: @Nullable
    private FileStatus[] listStatusInternal(String path) throws IOException {
      FileStatus[] files;
      FileSystem hdfs = getFs();
      try {
        files = hdfs.listStatus(new Path(path));
      } catch (FileNotFoundException e) {
        return null;
      }
      // Check if path is a file
      if (files != null && files.length == 1 && files[0].getPath().toString().equals(path)) {
        return null;
      }
      return files;
    }
docs: List status for given path. Returns an array of {@link FileStatus} with an entry for each file
  and directory in the directory denoted by this path.
  
  @param path the pathname to list
  @return {@code null} if the path is not a directory