ZipFile.jl
ZipFile.jl copied to clipboard
Add examples to the README
I can't figure out how to use it.
There's an example at ZipFile.jl (https://github.com/fhs/ZipFile.jl/blob/master/src/ZipFile.jl), but it's still frustrating that no documentation exists.
You can also go through the testing source file to figure out how to use it as well. But there really should be clear examples in the Readme.md or anywhere else.
Suggest using https://github.com/samoconnor/InfoZIP.jl instead but if you cannot for whatever reason here's an initial working example:
zarchive = ZipFile.Reader("target_file.zip")
extract_path = "some_location"
for f in zarchive.files
if endswith(f.name, "/")
# skip directories
continue
end
extract_loc = joinpath(extract_path, f.name)
open(extract_loc, "w") do fp
write(fp, read(f))
end
end
close(zarchive)