Reputation: 17981
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.
Upvotes: 1
Views: 790
Reputation: 87396
Linux has a command line utility called unzip
that will do it, IIRC. If that utility is available on Mac OS then you can just call it from ruby using system()
or back ticks.
Upvotes: 2