public static Collection<File> listFilesAndDirs(File directory,IOFileFilter fileFilter,IOFileFilter dirFilter){
  validateListFilesParameters(directory,fileFilter);
  IOFileFilter effFileFilter=setUpEffectiveFileFilter(fileFilter);
  IOFileFilter effDirFilter=setUpEffectiveDirFilter(dirFilter);
  Collection<File> files=new java.util.LinkedList<File>();
  if (directory.isDirectory()) {
    files.add(directory);
  }
  innerListFiles(files,directory,FileFilterUtils.or(effFileFilter,effDirFilter),true);
  return files;
}

public static Collection < File > listFilesAndDirs ( File directory , IOFileFilter fileFilter , IOFileFilter dirFilter ) { validateListFilesParameters ( directory , fileFilter ) ; IOFileFilter effFileFilter = setUpEffectiveFileFilter ( fileFilter ) ; IOFileFilter effDirFilter = setUpEffectiveDirFilter ( dirFilter ) ; Collection < File > files = new java . util . LinkedList < File > ( ) ; if ( directory . isDirectory ( ) ) { files . add ( directory ) ; } innerListFiles ( files , directory , FileFilterUtils . or ( effFileFilter , effDirFilter ) , true ) ; return files ; }
finds files within a given directory ( and optionally its subdirectories ) . all files found are filtered by an iofilefilter . < p > the resulting collection includes the subdirectories themselves . < p >
