void (@NotNull String newName) { if (!getFileSystem().isValidName(newName)) { throw new IllegalArgumentException(CoreBundle.message("file.invalid.name.error", newName)); } VirtualDirectoryImpl parent = getParent(); parent.removeChild(this); getSegment().setNameId(myId, FSRecords.getInstance().getNameId(newName)); parent.addChild(this); ((PersistentFSImpl)getPersistence()).incStructuralModificationCount(); }