While reading the EPiServer 5 SDK documentation, i found this:
Rename a Folder
There is no Rename method on the EPiServer.Web.Hosting.UnifiedDirectory class. To rename a folder you need to call the MoveTo method as follows:
protected void RenameFolder(string path, string oldName, string name)
{
if (IsFolder(path))
{
UnifiedDirectory directory =
[...]