void (File file, boolean recursively, List<? super String> result) { final File[] children = file.listFiles(); if (children != null) { // There is no guarantee about order of files on different OS Arrays.sort(children); for (File child : children) { final String extension = FileUtilRt.getExtension(child.getName()); if (child.isDirectory()) { if (recursively) { collectArchives(child, recursively, result); } } // todo get list of extensions mapped to Archive file type from IDE settings else if (AR_EXTENSIONS.contains(extension)) { result.add(JpsPathUtil.getLibraryRootUrl(child)); } } } }