ZipOutputStream
only zips files in a folder. I want to zip subfolders also. How can I achieve this?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
You have to recursively explore your directory in order to add all files in the zip.
See this small helper if you wish:
Alternative (and more handy) solution I just stumbled upon:
using the SevenZipSharp project
This article by C# MVP Peter Bromberg may solve your problem: Zip / Unzip folders and files with C#. It has complete code and a sample project.