public bool Move(GlobalPath sourcePath, GlobalPath destinationPath) { if (sourcePath.IsRoot) { throw new KOSPersistenceException("Can't move root directory: " + sourcePath); } if (sourcePath.IsParent(destinationPath)) { throw new KOSPersistenceException("Can't move directory to a subdirectory of itself: " + destinationPath); } Volume sourceVolume = GetVolumeFromPath(sourcePath); Volume destinationVolume = GetVolumeFromPath(destinationPath); bool verifyFreeSpace = sourceVolume != destinationVolume; if (!Copy(sourcePath, destinationPath, verifyFreeSpace)) { return(false); } if (!sourceVolume.Delete(sourcePath)) { throw new KOSPersistenceException("Can't remove: " + sourcePath); } return(true); }