public static void checkDelete(@NotNull VirtualFile file) throws IncorrectOperationException {
    VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor<Void>(VirtualFileVisitor.NO_FOLLOW_SYMLINKS) {
      @Override
      public boolean visitFile(@NotNull VirtualFile file) {
        if (FileTypeRegistry.getInstance().isFileIgnored(file)) {
          return false;
        }
        if (!file.isWritable()) {
          throw new IncorrectOperationException(CoreBundle.message("cannot.delete.a.read.only.file", file.getPresentableUrl()));
        }
        return true;
      }
    });
  }
public static void checkDelete(@NotNull VirtualFile file)