Closed ylchoo-personal closed 8 years ago
Here's a rough outline of what you want:
NSMutableArray<ZZArchiveEntry>
.ZZArchiveEntry
for each file you want in there. The filename should include any subdirectory name.updateEntries:
with this array.Most unzip utilities are OK with a zip file that doesn't have directory entries as I've suggested. If you need a directory entry, insert the directory entry before you insert the file entries.
You can look at this for guidance for a suitable recursive routine although it talks about unzipping instead.
I'm trying to zip some files and directories into a single zip file. I don't want to zip them inside another directory cause I need them to be at the root of the zip.
Tried this but this only take NSData but I have no clue how to get NSData for entire directory.
I'm trying to zip the 4 files "_rels", "[Content_Types]", "deoProps", "word" as one zip file which they will be the root.