zoukankan      html  css  js  c++  java
  • objectivec 解压缩zip

    1、首先引入libz.dylib框架

    2、到http://code.google.com/p/ziparchive/downloads/list下载所需要的第三方文件,并将其导入到项目中。

    3、解压缩ZIP文件代码如下:

        #import "ZipArchive.h"



    NSString *documentPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"]; ZipArchive *zipArchive = [[[ZipArchive alloc]init]autorelease]; NSString *path = @"Lesson0"; NSString *filePath = [[NSBundle mainBundle]pathForResource:path ofType:@"zip"]; if ([zipArchive UnzipOpenFile:filePath]) { [zipArchive UnzipFileTo:documentPath overWrite:YES]; [zipArchive UnzipCloseFile]; }
  • 相关阅读:
    MyCat清单
    Nginx整合Tomcat
    Nginx安装与配置
    Spring清单
    Shiro清单
    Dubbo清单
    MyBatis清单
    查询数据库的编码
    myBatis
    面试
  • 原文地址:https://www.cnblogs.com/gaoxiao228/p/2467590.html
Copyright © 2011-2022 走看看