public File[] listFiles(FileFilter filter) {File[] files = listFiles();if (filter == null || files == null) {return files;}List<File> result = new ArrayList<File>(files.length);for (File file : files) {if (filter.accept(file)) {result.add(file);}}return result.toArray(new File[result.size()]);}
public java.io.File[] listFiles(java.io.FileFilter filter){java.io.File[] files = listFiles();if (filter == null || files == null){return files;}java.util.List<java.io.File> result = new java.util.ArrayList<java.io.File>(files.Length);foreach (java.io.File file in files){if (filter.accept(file)){result.add(file);}}return result.toArray(new java.io.File[result.size()]);}