ZipFile.jl icon indicating copy to clipboard operation
ZipFile.jl copied to clipboard

How to extract a file in a zip

Open sylvaticus opened this issue 5 years ago • 2 comments

I understood how to write files to the zip or read files in a zip, but how can I extract a file in a zip archive to disk (or, equivalently, extract the whole zip without using OS specific tools) ?

sylvaticus avatar Feb 13 '20 16:02 sylvaticus

I was also struggling to figure this out, I found a solution with the InfoZIP.jl package, which offers a unzip function

InfoZIP.unzip("foo.zip", "/tmp/")

onetonfoot avatar Feb 18 '20 16:02 onetonfoot

Ah, thank you.. I didn't search well enough, I ended up writing my own utility function based on ZipFile: https://discourse.julialang.org/t/how-to-extract-a-file-in-a-zip-archive-without-using-os-specific-tools/34585/5

sylvaticus avatar Feb 18 '20 17:02 sylvaticus