We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
http://code.google.com/p/objective-zip/
读取文件
列出内部文件
有关目录结构的注意事项
请注意,zip 文件内部没有文件文件夹层次结构的表示:它只是嵌入文件名中(即:名称类似于
x/y/z/file.txt
)。由提取文件的程序将这些文件名视为表达结构并在文件系统上重建它(在创建过程中反之亦然)。常见的拉链/解拉链器只是遵循这个规则。来自手册
http://code.google.com/p/objective-zip/
Read file out
List files inside
Note about direcotry structure
Please note that inside the zip files there is no representation of a file-folder hierarchy: it is simply embedded in file names (i.e.: a file with a name like
x/y/z/file.txt
). It is up to the program that extracts the files to consider these file names as expressing a structure and rebuild it on the file system (and viceversa during creation). Common zippers/unzippers simply follow this rule.from manual
请参阅 LOZIPFileWrapper:
See LOZIPFileWrapper:
您可以使用 Marek Sebera 的想法,但您可以首先列出 zip 文件内容:
想法一:
- 只需获取原始标题列表(使用上述想法)并拥有 UITableView
- 选择标题后,从 uitableview 获取 zip 中的文件编号,然后将其解压
文件名示例:
哈哈.txt
路径/hello.doc
path/dir/lol/file.txt
想法二:
- 解档到某个地方(比如库目录)
- 当用户完成后,重新压缩
You could use Marek Sebera's idea, but you could start by listing the zip file contents:
Idea One:
- just get a list of the raw titles (use the above idea) and have a UITableView
- When a title is selected, get the file's number in the zip from the uitableview, then unarchive it
Example of filenames:
lol.txt
path/hello.doc
path/dir/lol/file.txt
Idea Two:
- unarchive to somewhere (like the library dir)
- when the user finishes, re-compress