@Override
	public synchronized void deleteFolder(String folderPath) throws IOException {

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

		if (SEPARATOR.equals(folderPath)) {
			throw new IOException("Root folder may not be deleted");
		}

		File file = getFile(folderPath);
		if (!file.exists()) {
			return;
		}
		if (!file.isDirectory()) {
			throw new FileNotFoundException(folderPath + " does not exist or is not a directory");
		}
		String[] contents = file.list();
		if (contents.length != 0) {
			if (contents.length > 1 || !".properties".equals(contents[0])) {
				throw new FolderNotEmptyException(folderPath + " is not empty");
			}
		}
		FileUtilities.deleteDir(file);

		eventManager.folderDeleted(getParentPath(folderPath), getName(folderPath));
	}
Deallocate item storage
@param folderPath
@param itemName
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/MangledLocalFileSystem.java