public @Override Set<File> locateAll(String relativePath, String codeNameBase, boolean localized) { Set<File> result = null; for (InstalledFileLocator ifl : getInstances()) { Set<File> added = ifl.locateAll(relativePath, codeNameBase, localized); // avoid allocating extra lists, under the assumption there is only one result: if (!added.isEmpty()) { if (result == null) { result = added; } else { result = new LinkedHashSet<File>(result); result.addAll(added); } } } return result != null ? result : Collections.<File>emptySet(); } };
Collection<Locale> user = new HashSet<Locale>(); for (File dictDir : InstalledFileLocator.getDefault().locateAll("modules/dict", null, false)) { File[] children = dictDir.listFiles(new FileFilter() { public boolean accept(File pathname) {