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