guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
246 stars 29 forks source link

Feature: glob ignore/include #65

Closed konsumer closed 1 year ago

konsumer commented 1 year ago

It would be cool to be able to include/ignore files in createZipArchive/addDir with an optional glob-pattern:

Like this would include all top-level files in myfiles/, but exclude .DS_Store files:

createZipArchive("myfiles/*", "file.zip", ".DS_Store")

Or include all files in current directory recursively, except zip files:

createZipArchive("**/*", "file.zip", "*.zip")

If there is interest, I can PR for it.

guzba commented 1 year ago

Hi and thanks for suggestion. Creating zip archives needs to be redone and is much more complex to do correctly than reading. I do not want to make any changes or new promises around the current zip archive creation. Thanks for the offer though.