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)); } }
public override IEnumerable <string> Uncompress(string compressFile, string directory, IEnumerable <CompressFile> selectedFiles, UncompressOptions uncompressOptions = UncompressOptions.None) { return(ZipArchive.Unzip(compressFile, directory, selectedFiles, uncompressOptions)); }
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); } }