且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用SharpZipLib从zip文件中提取文件夹?

更新时间:2023-10-21 11:51:04

我认为这是更简单的方法.默认功能(请在此处查看更多信息 https://github.com/icsharpcode/SharpZipLib/wiki/FastZip)

I think it is the easier way. Default functionality (please look here for more info https://github.com/icsharpcode/SharpZipLib/wiki/FastZip)

它用文件夹提取.

代码:

using System;
using ICSharpCode.SharpZipLib.Zip;

var zipFileName = @"T:\Temp\Libs\SharpZipLib_0860_Bin.zip";
var targetDir = @"T:\Temp\Libs\unpack";
FastZip fastZip = new FastZip();
string fileFilter = null;

// Will always overwrite if target filenames already exist
fastZip.ExtractZip(zipFileName, targetDir, fileFilter);