public static FileStatus [ ] listFiles ( boolean recurse , FileSystem hdfs , Path inputPath , JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter ) throws IOException { if ( recurse ) { List < FileStatus > fileStatusesList = new ArrayList < FileStatus > ( ) ; traverseDirs ( fileStatusesList , hdfs , inputPath , jobFileModifiedRangePathFilter ) ; FileStatus [ ] fileStatuses = ( FileStatus [ ] ) fileStatusesList . toArray ( new FileStatus [ fileStatusesList . size ( ) ] ) ; return fileStatuses ; } else { return hdfs . listStatus ( inputPath , jobFileModifiedRangePathFilter ) ; } }
Gets the list of files for a given path filtered as per the input path range filter Can go into directories recursively