private HarddiskDirectory ParentDirectoryForPath(VolumePath path, bool create = false)
{
HarddiskDirectory directory = RootHarddiskDirectory;
if (path.Depth > 0)
{
return RootHarddiskDirectory.GetSubdirectory(path.GetParent(), create);
}
else
{
throw new Exception("This directory does not have a parent");
}
}