I’m currently attempting to download a zip file from a website and then uncompress it onto my desktop.
So far this is the only way I’ve managed to do it:
URL zipUrl ("http://www.example.com/test.zip"); InputStream* urlStream = zipUrl.createInputStream (true); ZipFile zipFile (urlStream, true); zipFile.uncompressTo(File::getSpecialLocation (File::userDesktopDirectory));
However this produces some errors:
- Xcode is warning me of several “Object xxx of class NSCFString autoreleased with no pool in place - just leaking” warnings
- I can’t seem to open any of my uncompressed files - they’re either not recognised, come up with ‘permission denied’, or just won’t open
- It produces a empty __MAXOSX folder alongside it
So I get the feeling my code above isn’t quite right.
Could anyone provide any insight?