code: protected void addLocatedInputPathRecursively(List<LocatedFileStatus> result,
        FileSystem fs, Path path, PathFilter inputFilter) 
        throws IOException {
      for(RemoteIterator<LocatedFileStatus> itor = 
        fs.listLocatedStatus(path, inputFilter); itor.hasNext();) {
        LocatedFileStatus stat = itor.next();
        if (stat.isDir()) {
          addLocatedInputPathRecursively(result, fs, stat.getPath(), inputFilter);
        } else {
          result.add(stat);
        }
      }          
    }
docs: Add files in the input path recursively into the results.
  @param result
  The List to store all files together with their block locations
  @param fs
  The FileSystem.
  @param path
  The input path.
  @param inputFilter
  The input filter that can be used to filter files/dirs.
  @throws IOException