I have a 200mb zip file, which I want to extract to a temporary folder for processing. I have experience with rubyzip library before. However it seems that extracting all files using it is a bit of pain according to this blog post, needing to create directory before extracting individual files:
Is there an easier way to extract all things into a directory? It needs to work on both Mac OS X and Linux, but would be better if the solution is truly cross-platform.
Linux has a command line utility called
unzipthat will do it, IIRC. If that utility is available on Mac OS then you can just call it from ruby usingsystem()or back ticks.