core/src/main/java/com/twitter/elephantbird/util/HdfsUtils.java
public static void collectPaths(Path path,
                                  FileSystem fs,
                                  PathFilter filter,
                                  final List<Path> accumulator) throws IOException {

    walkPath(path, fs, filter, new PathVisitor() {
      @Override
      public void visit(FileStatus fileStatus) {
        accumulator.add(fileStatus.getPath());
      }
    });
  }
public static void collectPaths(Path path,
                                  FileSystem fs,
                                  PathFilter filter,
                                  final List<Path> accumulator) throws IOException {

    walkPath(path, fs, filter, new PathVisitor() {
      @Override
      public void visit(FileStatus fileStatus) {
        accumulator.add(fileStatus.getPath());
      }
    });
  }
Recursively walk a path, adding paths that are accepted by filter to accumulator

@param path root path to begin walking, will be added to accumulator
@param fs FileSystem for this path
@param filter filter to determine which paths to accept
@param accumulator all paths accepted will be added to accumulator
@throws IOException