ZipFile.jl

Hello,

The README for ZipFile.jl talks about writing to a new zip file and reading from it. Is there a way to add a file to an existing zip file? i.e., append a file?

Thanks,

Ritchie

Seems to be the very first example in the documentation.

1 Like

Hi Tamas, thank you for your quick reply.

The first example creates a new zip file and then appends files to it. I have an existing zip file. I would like to open it and add files to it. For example,

  1. Create “myzip.zip”, add “file1.txt”, close “myzip.zip”.
  2. Later…, open “myzip.zip”, add “file2.txt”, close “myzip.zip”. At this point, “myzip.zip” should contain two files.

Ritchie

I think that you can open a zip file, read & store the contents, and then create a new one, write out the contents + the new file. That said, perhaps you could open an issue to get the desired behavior, since the pieces seem to be there.

Also see
https://github.com/samoconnor/InfoZIP.jl
which seems to support adding files.