code: private FileStatus[] getFileStatusList(final String pathString)
        throws HadoopSecurityManagerException, IOException {
      ensureHdfs();
  
      final Path path = new Path(pathString);
      FileStatus pathStatus = null;
      try {
        pathStatus = this.hdfs.getFileStatus(path);
      } catch (final IOException e) {
        cleanUp();
      }
  
      if (pathStatus != null && pathStatus.isDir()) {
        return this.hdfs.listStatus(path);
      }
  
      return new FileStatus[0];
    }
docs: Returns an array of the file statuses of the files/directories in the given
  path if it is a directory and an empty array otherwise.