private static void collectPaths(@Nullable VirtualFile file, @NotNull Collection<? super File> outFiles, boolean recursive) throws ProcessCanceledException {
    if (file != null && !isIgnoredOrUnderIgnoredDirectory(file)) {
      if (recursive) {
        processRecursively(file, !isInContentOfOpenedProject(file), f -> outFiles.add(new File(f.getPath())));
      }
      else {
        outFiles.add(new File(file.getPath()));
      }
    }
  }
private static void collectPaths(@Nullable VirtualFile file, @NotNull Collection<? super File> outFiles, boolean recursive)