code: final static protected List<FileStatus> listStatus(JobContext job
                                          ) throws IOException {
      List<FileStatus> result = new ArrayList<FileStatus>();
      Path[] dirs = getInputPaths(job);
      if (dirs.length == 0) {
        throw new IOException("No input paths specified in job");
      }
  
      List<IOException> errors = new ArrayList<IOException>();
      
      // creates a MultiPathFilter with the hiddenFileFilter and the
      // user provided one (if any).
      List<PathFilter> filters = new ArrayList<PathFilter>();
      filters.add(hiddenFileFilter);
      PathFilter jobFilter = getInputPathFilter(job);
      if (jobFilter != null) {
        filters.add(jobFilter);
      }
      PathFilter inputFilter = new MultiPathFilter(filters);
      
      for (int i=0; i < dirs.length; ++i) {
        Path p = dirs[i];
        FileSystem fs = p.getFileSystem(job.getConfiguration()); 
        FileStatus[] matches = fs.globStatus(p, inputFilter);
        if (matches == null) {
          errors.add(new IOException("Input path does not exist: " + p));
        } else if (matches.length == 0) {
          errors.add(new IOException("Input Pattern " + p + " matches 0 files"));
        } else {
          for (FileStatus globStat: matches) {
            if (globStat.isDir()) {
              for(FileStatus stat: fs.listStatus(globStat.getPath(),
                  inputFilter)) {
                result.add(stat);
              }          
            } else {
              result.add(globStat);
            }
          }
        }
      }
  
      if (!errors.isEmpty()) {
        throw new InvalidInputException(errors);
      }
      LOG.info("Total input paths to process : " + result.size());
      return result;
    }
docs: List input directories.
  Mark this method to be final to make sure this method does not
  get overridden by any subclass.
  If a subclass historically overrides this method, now it needs to override
  {@link #listLocatedStatus(JobContext)} instead.
  
  @param job the job to list input paths for
  @return array of FileStatus objects
  @throws IOException if zero items.