如何在swift中解压缩文件?在Objective-C中,我使用了SSZipArchive,我喜欢它.如下面的代码所示.我怀疑如果我决定保留SSZipArchive,我将不得不将Objective-C文件桥接到我的Swift文件.是否有任何更新的第三方,或更好的Apple文档在Swift中解压缩文件?
NSString *zipPath = [self.globalFileStrucure stringByAppendingPathComponent:@"zipfile.zip"];
[data writeToFile:zipPath options:0 error:&error];
BOOL unZipped = 0;
unZipped = [SSZipArchive unzipFileAtPath:zipPath toDestination:self.globalFileStrucure];
Run Code Online (Sandbox Code Playgroud)