fhs / ZipFile.jl

Read/Write ZIP archives in Julia
Other
50 stars 45 forks source link

How to extract a file in a zip #67

Open sylvaticus opened 4 years ago

sylvaticus commented 4 years ago

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) ?

onetonfoot commented 4 years ago

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/")
sylvaticus commented 4 years ago

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