DotNetZip 介绍
DotNetZip 是一个短小易用的用来操作 zip 文件的 .NET 应用,可以在 .NET 的任何一种语言中使用。
代码示例:
try { using (ZipFile zip = new ZipFile("MyZipFile.zip") { // add this file into the "images" directory in the zip archive zip.AddFile("c:\\photos\\personal\\7440-N49th.png", "images"); // add this file into a different directory in the archive zip.AddFile("c:\\Desktop\\2005_Annual_Report.pdf", "files"); zip.AddFile("ReadMe.txt"); zip.Save(); } } catch (System.Exception ex1) { System.Console.Error.WriteLine("exception: " + ex1); }
DotNetZip 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。