public void moveTo(RepositoryFolder newParent, String newFolderName, String user)
			throws InvalidNameException, IOException {
		synchronized (fileSystem) {
			repository.suspendEventDispatching();
			try {
				repository.validate();
				repository.validateWritePrivilege(user);
				if (parent == null) {
					throw new IOException("Root folder may not be moved");
				}
				if (newParent.isDescendantOf(this)) {
					throw new IOException("New folder must not be descendant");
				}
				if (containsCheckout()) {
					throw new FileInUseException(
						getPathname() + " contains one or more checked-out files");
				}
				String oldPath = getPathname();
				if (name.equals(newFolderName)) {
					// Handle move - name does not change
					fileSystem.moveFolder(parent.getPathname(), name, newParent.getPathname());
					parent.folderMap.remove(newFolderName);
					newParent.folderMap.put(newFolderName, this);
					parent = newParent;
				}
				else if (parent.equals(newParent)) {
					// Handle rename
					fileSystem.renameFolder(parent.getPathname(), name, newFolderName);
					parent.folderMap.remove(name);
					name = newFolderName;
					parent.folderMap.put(newFolderName, this);
				}
				else {
					throw new IOException("Folder can not be renamed and moved");
				}
				pathChanged();
				RepositoryManager.log(repository.getName(), oldPath,
					"folder moved to " + getPathname(), user);
			}
			finally {
				repository.flushChangeEvents();
			}
		}
	}
Move this folder to a new parent folder and optionally change its name.
@param newParent new parent folder
@param newFolderName new name for this folder
@param user user who is initiating request
@throws InvalidNameException if newFolderName is invalid
@throws IOException if operation fails
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/store/RepositoryFolder.java