public List < File > getFiles ( File dir , FileFilter filter ) { // System.out.println("Standardoutput: " + standardoutput); List < File > files = new LinkedList < File > ( ) ; for ( File f : dir . listFiles ( ) ) { if ( f . isFile ( ) ) { if ( filter . accept ( f ) ) files . add ( f ) ; } else { files . addAll ( getFiles ( f , filter ) ) ; } } return files ; }
Returns a list with all files in the given Directory matching the given Filter