引入 SharpCompress
https://download.csdn.net/download/weixin_42020830/87737306
string targetFile="c:\\test.zip";
string zipFile="c:\\test";文章来源:https://www.toymoban.com/news/detail-427517.html
using (Stream stream =System.IO.File.OpenRead(targetFile))
{
var reader = ReaderFactory.Open(stream);
while (reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
reader.WriteEntryToDirectory(zipFile, new ExtractionOptions { ExtractFullPath = true, Overwrite = true });
}
}
}文章来源地址https://www.toymoban.com/news/detail-427517.html
到了这里,关于.net rar zip压缩包解压的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!