public void setParent(@NotNull VirtualFile _newParent) {
    ApplicationManager.getApplication().assertWriteAccessAllowed();

    VirtualDirectoryImpl newParent = (VirtualDirectoryImpl)_newParent;
    VirtualDirectoryImpl oldParent = getParent();

    //Both oldParent.myData & newParent.myData locks must be acquired here -- to prevent
    // FileAlreadyCreatedException in VirtualDirectoryImpl.createChildImpl()/VfsData$Segment.initFileData()
    // if called concurrently
    VirtualDirectoryImpl.runUnderAllLocksAcquired(
      () -> {
        oldParent.removeChild(this);

        getSegment().changeParent(myId, newParent);
        newParent.addChild(this);
        return (Void)null;
      },
      oldParent, newParent
    );
    updateLinkStatus(newParent);

    owningPersistentFS().incStructuralModificationCount();
  }
public void setParent(@NotNull VirtualFile _newParent)