I want to pack to zip some folder using SharpZipLib. Example stucture
directory1:
directory2:
file1
file2
directory3:
directory4:
When I pack it using c# code from here:
http://wiki.sharpdevelop.net/SharpZipLib-Zip-Samples.ashx#Create_a_Zip_with_full_control_over_contents_0
I get zip archives without directory3
and directory4
.
My question is how can I pack to get archives with directory3
and directory4
.
FastZip fastZip = new FastZip();
fastZip.CreateEmptyDirectories = true;
// Include all files by recursing through the directory structure
bool recurse = true;
// Dont filter any files at all
string filter = null;
fastZip.CreateZip("fileName.zip", @"C:\SourceDirectory", recurse, filter);
one caveat is that it can't handle UTF-8 file names.
Here is the link to the documentation wiki:
http://wiki.sharpdevelop.net/SharpZipLib_FastZip.ashx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With