示例#1
0
        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);
        }
示例#2
0
        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);
        }