public String[] list(FilenameFilter filter) {String[] filenames = list();if (filter == null || filenames == null) {return filenames;}List<String> result = new ArrayList<String>(filenames.length);for (String filename : filenames) {if (filter.accept(this, filename)) {result.add(filename);}}return result.toArray(new String[result.size()]);}

public string[] list(java.io.FilenameFilter filter){string[] filenames = list();if (filter == null || filenames == null){return filenames;}java.util.List<string> result = new java.util.ArrayList<string>(filenames.Length);foreach (string filename in filenames){if (filter.accept(this, filename)){result.add(filename);}}return result.toArray(new string[result.size()]);}
