private void executeMove(@NotNull VirtualFile file, @NotNull VirtualFile newParent) {
    clearIdCache();

    int fileId = getFileId(file);
    int newParentId = getFileId(newParent);
    VirtualFile oldParent = file.getParent();
    int oldParentId = getFileId(oldParent);

    VirtualFileSystemEntry virtualFileSystemEntry = (VirtualFileSystemEntry)file;

    removeIdFromChildren(oldParent, oldParentId, fileId);
    vfsPeer.setParent(fileId, newParentId);
    ChildInfo newChild = new ChildInfoImpl(fileId, virtualFileSystemEntry.getNameId(), null, null, null);
    vfsPeer.update(newParent, newParentId, children -> {
      // check that names are not duplicated
      ChildInfo duplicate = findExistingChildInfo(file, file.getName(), children.children);
      if (duplicate != null) return children;
      return children.insert(newChild);
    });
    virtualFileSystemEntry.setParent(newParent);
  }
private void executeMove(@NotNull VirtualFile file, @NotNull VirtualFile newParent)