List<LookupFile> (LookupFilter filter) { List<Path> files = NioFiles.list(myFile); List<LookupFile> result = new ArrayList<>(files.size()); for (Path each : files) { IoFile file = new IoFile(each); if (filter.isAccepted(file)) { result.add(file); } } result.sort((o1, o2) -> StringUtil.compare(o1.getName(), o2.getName(), SystemInfo.isFileSystemCaseSensitive)); return result; }