Set<String> (@NotNull Collection<? extends Path> files, boolean includeNestDirs) { Set<String> result = new HashSet<>(); for (Path root : new HashSet<>(files)) { scanFolder(root, includeNestDirs, result); } return result; }