@Override
  public void renameFile(Object requestor, @NotNull VirtualFile file, @NotNull String newName) throws IOException {
    if (!isValidName(newName)) {
      throw new IOException(CoreBundle.message("file.invalid.name.error", newName));
    }
    if (!file.exists()) {
      throw new IOException(IdeCoreBundle.message("vfs.file.not.exist.error", file.getPath()));
    }
    var parent = file.getParent();
    if (parent == null) {
      throw new IOException(CoreBundle.message("cannot.rename.root.directory", file.getPath()));
    }
    var sameName = !file.isCaseSensitive() && newName.equalsIgnoreCase(file.getName());
    if (!sameName && parent.findChild(newName) != null) {
      throw new IOException(IdeCoreBundle.message("vfs.target.already.exists.error", parent.getPath() + '/' + newName));
    }

    if (!auxRename(file, newName)) {
      var nioFile = convertToNioFileAndCheck(file, false);
      var nioTarget = nioFile.resolveSibling(newName);
      try {
        Files.move(nioFile, nioTarget, StandardCopyOption.ATOMIC_MOVE);
      }
      catch (AtomicMoveNotSupportedException e) {
        Files.move(nioFile, nioTarget);
      }
    }

    auxNotifyCompleted(handler -> handler.rename(file, newName));
  }
@Override
  public void renameFile(Object requestor, @NotNull VirtualFile file, @NotNull String newName)