r-lib / zip

Platform independent zip compression via miniz
https://r-lib.github.io/zip/
Other
83 stars 19 forks source link

Feature: allow manual specification of the ZIP directory structure #50

Open AshesITR opened 4 years ago

AshesITR commented 4 years ago

It would be fantastic to allow for manual specification of the ZIP directory structure in a zip::zipr or zip::zipr_append call, e.g.

zip::zipr("myzip.zip", files = list("myfile.txt" = "myfile-on-disk.txt"))

I skimmed the code and think it shouldn't be too hard by changing the key in get_zip_data() if names are present. I can give it a try if you think that feature would be useful.

Ideally:

gaborcsardi commented 4 years ago

Yeah, I think that would be pretty cool. A PR is welcome.

AshesITR commented 2 years ago

@gaborcsardi are you still interested in this feature? If so, I can try rebasing #51 onto current main.

gaborcsardi commented 2 years ago

Yes, sorry for the wait. I'll look at it soon, before the next release.