Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AshesITR opened this issue May 8, 2020 · 3 comments · May be fixed by #56
Open

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

AshesITR opened this issue May 8, 2020 · 3 comments · May be fixed by #56
Labels
feature a feature request or enhancement

Comments

@AshesITR
Copy link
Contributor

AshesITR commented May 8, 2020

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:

  • for plain files, the name directly translates to the key
  • for directories, the name replaces the key up to the specific directory (so the subdirectories and files have the same relative structure, just a different parent name / path)
@gaborcsardi
Copy link
Member

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

@gaborcsardi gaborcsardi added enhancement feature a feature request or enhancement and removed enhancement labels May 8, 2020
AshesITR added a commit to AshesITR/zip that referenced this issue May 9, 2020
TODO: update documentation
AshesITR added a commit to AshesITR/zip that referenced this issue May 16, 2020
fix NEWS for r-lib#50
gaborcsardi pushed a commit that referenced this issue Jul 10, 2020
TODO: update documentation
gaborcsardi pushed a commit that referenced this issue Jul 10, 2020
fix NEWS for #50
gaborcsardi added a commit that referenced this issue Jul 10, 2020
@AshesITR
Copy link
Contributor Author

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

@gaborcsardi
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
2 participants