public static ArchivedDirectory GetRootDirectory(ArchiveSite site, string dirPathname) { ArchivedDirectory d = new ArchivedDirectory(site, new DirectoryInfo(dirPathname)); d.path = "/"; d.SeekSubObjects(); d.isRoot = true; site.AddStoredObject(d); return(d); }
public static ArchivedDirectory GetSubDirectory(ArchivedDirectory parent, string dirPathname) { ArchivedDirectory d = new ArchivedDirectory(parent.site, new DirectoryInfo(dirPathname)); d.parent = parent; d.path = parent.path + d.GetName() + "/"; d.SeekSubObjects(); d.isRoot = false; d.site.AddStoredObject(d); return(d); }