Hi, I have a zipped file, which i want to extract the contents of it. What is the exact procedure that i should do to achieve it. Is there any framework to unzip the files in cocoa framework or objective C.
A:
If you just want to uznip the file, I would recommend using NSTask
to call unzip(1). It's probably smart to copy the file to a directory you control -- probably in /tmp -- before unzipping.
Colin Barrett
2010-02-19 18:40:39
You don't control /tmp, anyone can write to it.
Graham Lee
2010-02-20 07:47:37
Graham: But it's a fine place to do temporary work to avoid clobbering an existing folder.
Colin Barrett
2010-02-20 08:03:52
Thanks it did work.
iSight
2010-02-21 06:35:16
Use `NSTemporaryDirectory()` instead of `/tmp`, although be careful, it behaves a little more like `/var/tmp`. It will get cleaned out, but it is not always at a reboot.
dreamlax
2010-02-21 23:10:18