public void setNewName(@NotNull String newName) {
    if (!getFileSystem().isValidName(newName)) {
      throw new IllegalArgumentException(CoreBundle.message("file.invalid.name.error", newName));
    }

    PersistentFSImpl pfs = owningPersistentFS();

    VirtualDirectoryImpl parent = getParent();
    //children are sorted by name: child position must change after its name has changed
    parent.removeChild(this);
    pfs.peer().setName(myId, newName);
    parent.addChild(this);

    pfs.incStructuralModificationCount();
  }
public void setNewName(@NotNull String newName)