Add `filter` and `map` to file paths
jondot opened this issue · 0 comments
jondot commented
Suggestion / Feature Request
Just like in the npm
version of decompress
: https://github.com/kevva/decompress#filter
The idea is to let users:
- filter out items from decompression, in archives that support listing of entries (
filter
) - rename destination paths or file names (
map
)
There are two primary challenges:
- Accepting a type of such a function in a clean, easy way, through
Opts
. It can be anFn
signature, or a trait calledFilterMap
which implements an identityfilter
andmap
by default, and then passed through aBox<dyn ..>
- Understanding which compressor can support such operations and which cannot (don't fight with those which cannot, just don't implement for those)