my method works for zipping files from the created and entered temporary directory:
NSURL *destURL = self.archiveDestURL; NSTask *task = [[NSTask alloc] init]; [task setCurrentDirectoryPath:[srcURL path]]; [task setLaunchPath:@"/usr/bin/zip"]; NSArray *argsArray = [NSArray arrayWithObjects:@"-r", @"-q", [destURL path], @".", @"-i", @"*", nil]; [task setArguments:argsArray]; [task launch]; [task waitUntilExit];
but what I would like to have when unpacking is a folder with files. Of course, I can create a folder in tempDir and write my files there, but what is the zip argument so that the folder is the top level in the created archive?
I have not seen this in man zip .
source share