public ZipFileDirectoryInfo(ZipFileDirectoryInfo root, FileInfo file) { Root = root; if (root != root.Root) { throw new Exception("DirectoryInfo must have a valid root"); } // Link Directories string path = file.DirectoryName; ZipFileDirectoryInfo directoryChild = null; if (!IsDirectoryExistsInTree(path)) { // Walk up FileTree while (!string.IsNullOrEmpty(path)) { path = Path.GetDirectoryName(path); if (IsDirectoryExistsInTree(path)) { break; } // directoryChild = new ZipFileDirectoryInfo(Root, ); } } // Add File to Manifest // Add Folder to Manifest }
public ZipFileDirectoryInfo(PSDriveInfo psDriveInfo) { Root = this; // Populate List using (ZipArchive zipArchive = ZipFile.OpenRead(psDriveInfo.Root)) { foreach (ZipArchiveEntry zipArchiveEntry in zipArchive.Entries) { Console.WriteLine("Generating : {0}", zipArchiveEntry); ZipFileItemInfo OutputItem = new ZipFileItemInfo(zipArchiveEntry, psDriveInfo); } } }
public ZipFileDirectoryInfo(ZipFileDirectoryInfo root) { Root = root; }