void (@NotNull Collection<? extends VirtualFile> source, @NotNull List<? super VirtualFile> target) { for (VirtualFile file : source) { if (file.isDirectory() && file.isValid()) { target.add(file); } } }