0

I need to uncompress content of ZIP file into selected directory. I did make:

ZZArchive* archive = [ZZArchive archiveWithContentsOfURL:[NSURL fileURLWithPath:@:"blahblah.zip"]];
for (NSUInteger index = 0, count = archive.entries.count; index < count; ++index)
{
  ZZArchiveEntry* archiveEntry = archive.entries[index];
  NSString  *inZipFileName = nextEntry.fileName;
}

But how to uncompress archiveEntry into filename inZipFileName?

4

1 回答 1

1

最后,很简单:

NSData *data = [nextEntry data];
[data writeToFile:@"uncompressed_filename" atomically:NO];

维尼,维迪,维西...

于 2012-12-06T15:06:30.230 回答