r-lib / zip

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

Suggest use of fs and tibble classes in `zip_list()` #86

Closed k5cents closed 2 years ago

k5cents commented 2 years ago

This would create new options for how the data frame and columns returned by zip_list() appear.

  1. The tidyverse/tibble and r-lib/fs packages are suggested.
  2. as_tibble() is used if the tibble package is installed.
  3. The bytes, permissions, and file path columns use similar classes to fs::file_info() if fs is installed.
gaborcsardi commented 2 years ago

Thanks! We are not going to use this PR in this form. The reason is that if we do, that makes zip unpredictable. In particular data frames and tibbles behave differently, so depending on whether the user has tibble installed, the same code may give different results.

We could have a helper function that converts, but then you might as well call as_tibble() and fs_path() on the results, I guess?