Esempio n. 1
0
 public static IEnumerable <string> Unzip(string zipFile, string directory, IEnumerable <CompressFile> selectedFiles, UncompressOptions uncompressOptions = UncompressOptions.None)
 {
     //using (FileStream fs = new FileStream(zipFile, FileMode.Open))
     using (FileStream fs = zFile.Open(zipFile, FileMode.Open))
         using (ZipArchive zipArchive = new ZipArchive(fs, ZipArchiveMode.Read))
         {
             zipArchive.SetUnzipOptions(uncompressOptions);
             zipArchive.SetUnzipSelectedFiles(selectedFiles);
             return(zipArchive.Unzip(directory));
         }
 }
Esempio n. 2
0
 public override IEnumerable <string> Uncompress(string compressFile, string directory, IEnumerable <CompressFile> selectedFiles, UncompressOptions uncompressOptions = UncompressOptions.None)
 {
     return(ZipArchive.Unzip(compressFile, directory, selectedFiles, uncompressOptions));
 }
Esempio n. 3
0
 public static IEnumerable<string> Unzip(string zipFile, string directory, IEnumerable<CompressFile> selectedFiles, UncompressOptions uncompressOptions = UncompressOptions.None)
 {
     using (FileStream fs = new FileStream(zipFile, FileMode.Open))
     using (ZipArchive zipArchive = new ZipArchive(fs, ZipArchiveMode.Read))
     {
         zipArchive.SetUnzipOptions(uncompressOptions);
         zipArchive.SetUnzipSelectedFiles(selectedFiles);
         return zipArchive.Unzip(directory);
     }
 }