private boolean createItem(VirtualFile dir, String name, boolean directory, final boolean recursive) {
    final VcsShowConfirmationOption.Value value = myAddConfirmation.getValue();
    if (VcsShowConfirmationOption.Value.DO_NOTHING_SILENTLY.equals(value)) return false;

    if (isUndo() && SvnUtil.isAdminDirectory(dir, name)) {
      return false;
    }
    File ioDir = getIOFile(dir);
    boolean pendingAdd = isPendingAdd(dir);
    if (!SvnUtil.isSvnVersioned(myVcs, ioDir) && !pendingAdd) {
      return false;
    }
    final File targetFile = new File(ioDir, name);
    Status status = getFileStatus(targetFile);

    if (status == null || status.is(StatusType.STATUS_NONE, StatusType.STATUS_UNVERSIONED)) {
      myAddedFiles.add(new AddedFileInfo(dir, name, null, recursive));
      return false;
    }
    else if (status.is(StatusType.STATUS_MISSING)) {
      return false;
    }
    else if (status.is(StatusType.STATUS_DELETED)) {
      NodeKind kind = status.getNodeKind();
      // kind differs.
      if (directory && !kind.isDirectory() || !directory && !kind.isFile()) {
        return false;
      }
      try {
        if (isUndo()) {
          createRevertAction(targetFile, false).execute();
          return true;
        }
        myAddedFiles.add(new AddedFileInfo(dir, name, null, recursive));
        return false;
      }
      catch (VcsException e) {
        FileUtil.delete(targetFile);
        return false;
      }
    }
    return false;
  }
private boolean createItem(VirtualFile dir, String name, boolean directory, final boolean recursive)