@Override
	public synchronized void renameFolder(String parentPath, String folderName,
			String newFolderName) throws InvalidNameException, IOException {

		checkDisposed();

		if (readOnly) {
			throw new ReadOnlyException();
		}

		testValidName(newFolderName, false);

		String folderPath = getPath(parentPath, folderName);
		Folder folder;
		indexJournal.open();
		try {
			folder = getFolder(folderPath, GetFolderOption.READ_ONLY);
			if (folder.parent.folders.get(newFolderName) != null) {
				throw new DuplicateFileException(
					parentPath + SEPARATOR + newFolderName + " already exists.");
			}

			indexJournal.moveFolder(folderPath, getPath(parentPath, newFolderName));

			folder.parent.folders.remove(folderName);
			folder.name = newFolderName;
			folder.parent.folders.put(newFolderName, folder);
		}
		catch (NotFoundException e) {
			throw new FileNotFoundException(folderPath + " does not exist or is not a folder");
		}
		finally {
			indexJournal.close();
		}

		updateAffectedItemPaths(folder);

		eventManager.folderRenamed(parentPath, folderName, newFolderName);
	}
Deallocate item storage
@param folderPath
@param itemName
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.java