首页 > 代码库 > 源码0602-08-掌握-解压缩
源码0602-08-掌握-解压缩
//// ViewController.m// 08-掌握-解压缩#import "ViewController.h"#import "Main.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; [Main unzipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" toDestination:@"/Users/xiaomage/Desktop"];}- (void)createZipFile2{ [Main createZipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" withContentsOfDirectory:@"/Users/xiaomage/Desktop/Test"];}- (void)createZipFile{ NSArray *paths = @[ @"/Users/xiaomage/Desktop/Test/Snip20150713_276.png", @"/Users/xiaomage/Desktop/Test/Snip20150713_299.png", @"/Users/xiaomage/Desktop/Test/Snip20150713_500.png" ]; [Main createZipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" withFilesAtPaths:paths];}@end
//// ViewController.m// 09-掌握-解压缩#import "ViewController.h"#import <SSZipArchive.h>@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // [SSZipArchive createZipFileAtPath:<#(NSString *)#> withFilesAtPaths:<#(NSArray *)#>];// [SSZipArchive createZipFileAtPath:<#(NSString *)#> withContentsOfDirectory:<#(NSString *)#>];}@end
源码0602-08-掌握-解压缩
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。