private Runnable createDeleteRunnable(final Collection<? extends FilePath> filesToProcess, final List<? super VcsException> exceptions) {
    return () -> {
      for (FilePath file : filesToProcess) {
        VirtualFile vFile = file.getVirtualFile();  // for deleted directories
        final File ioFile = new File(file.getPath());
        try {
          createDeleteAction(ioFile, true).execute();
          if (vFile != null && vFile.isValid() && vFile.isDirectory()) {
            vFile.refresh(true, true);
            VcsDirtyScopeManager.getInstance(myVcs.getProject()).dirDirtyRecursively(vFile);
          }
          else {
            VcsDirtyScopeManager.getInstance(myVcs.getProject()).fileDirty(file);
          }
        }
        catch (VcsException e) {
          exceptions.add(e);
        }
      }
    };
  }
private Runnable createDeleteRunnable(final Collection<? extends FilePath> filesToProcess, final List<? super VcsException> exceptions)