Exemple #1
0
        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
        }
Exemple #2
0
        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);
                }
            }
        }
Exemple #3
0
 public ZipFileDirectoryInfo(ZipFileDirectoryInfo root)
 {
     Root = root;
 }