question: public static List < File > walk ( String path ) { LinkedList < File > output = new LinkedList < File > ( ) ; File root = new File ( path ) ; File [ ] list = root . listFiles ( ) ; if ( list == null ) { return output ; } for ( File f : list ) { if ( f . isDirectory ( ) ) { output . addAll ( walk ( f . getAbsolutePath ( ) ) ) ; } else { output . addLast ( f ) ; } } return output ; }
target:  Recursively walk through the path and return all found files (not directory)