Closed Heisenbean closed 8 years ago
To zip actual files, you'll need to open an NSStream
or NSData
from the file you want and pass that to the ZZArchiveEntry
initializer. Something like:
[ZZArchiveEntry archiveEntryWithFileName:fileName
compress:YES
dataBlock:^(NSError** error)
{
return [NSData dataWithContentsOfFile:file
options:0
error:error];
}]
thanks~
my folder has some files,i want to zip the folder,and i zip it like wiki https://github.com/pixelglow/ZipZap/wiki/Recipes but it has a problem,the files in the folder is not zip,it's create new files in the folder. simply,zipzap not zip my folder,it create a new folder and new files to zip. it's my code:
so,the right way to zip a folder is?