code: public FileStatus[] listStatus(Path f, PathFilter filter) throws IOException {
      ArrayList<FileStatus> results = new ArrayList<FileStatus>();
      listStatus(results, f, filter);
      return results.toArray(new FileStatus[results.size()]);
    }
docs: Filter files/directories in the given path using the user-supplied path
  filter.
  
  @param f
  a path name
  @param filter
  the user-supplied path filter
  @return an array of FileStatus objects for the files under the given path
  after applying the filter
  @throws IOException
  if encounter any problem while fetching the status
  FileNotFoundException is thrown if path f doesn't exist