IOS解压缩和压缩文件
来源:互联网 发布:高性能网络编程2 编辑:程序博客网 时间:2024/05/20 14:40
IOS中解压的方法
压缩文件:
ZipArchive *zip = [[ZipArchive alloc] init];
NSString *sZipPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/test.zip"];
NSString *img1Path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/img1.jpg"] ;
NSString* img2Path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/img2.jpg"] ;
BOOL bRet = [zip CreateZipFile2:sZipPath];
bRet = [zip addFileToZip:img1Path newname:@"img1.jpg"];
bRet = [zip addFileToZip:img2Path newname:@"img2.jpg"];
[zip CloseZipFile2];
[zip release];
解压缩:
ZipArchive *zip = [[ZipArchive alloc] init];
NSString *sZipPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/test.zip"];
NSString *unZipTo = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/test"];
if ([zip UnzipOpenFile:sZipPath])
{
[zip UnzipFileTo:unZipTo overWrite:YES];
[zip UnzipCloseFile];
}
[zip release];
- IOS解压缩和压缩文件
- IOS解压缩和压缩文件
- IOS解压缩和压缩文件
- iOS文件解压缩、带密码解压缩、压缩文件情况处理
- 解压缩文件和压缩文件的方法
- 在线解压缩 压缩文件
- linux(ubuntu) 解压缩,压缩文件
- 解压缩文件、压缩文件
- java 压缩文件 解压缩文件
- java对zip压缩文件解压缩
- 常见压缩文件的解压缩方法
- xz压缩文件的解压缩过程
- java解压缩文件和不解压读取压缩文件中的文本文件内容
- IOS解压缩和压缩zip文件
- Java 解压缩 zip格式的压缩文件
- linux包含权限压缩文件与解压缩
- iOS 使用ZipArchive压缩文件
- iOS 使用ZipArchive压缩文件
- valgrind 的使用简介
- 冒泡
- 搜狗浏览器搜集用户隐私遭泄露
- Python strip lstrip rstrip使用方法
- C++ 字符串操作经验集
- IOS解压缩和压缩文件
- SQL Server Profiler -- T-sql, sql监视利器
- 游戏服务器架构
- SensorManager与Sensor交互
- 第11周项目5--歌手大奖赛积分系统(最低级的)
- CGLayer和CALayer区别
- 黑马程序员——Java 常用类库
- POJ_3100_Root of the Problem(暴力)
- 疯狂java java反射机制