thecodrr / fdir

⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
https://thecodrr.github.io/fdir/
MIT License
1.51k stars 58 forks source link

Feature request: pass full path to `exclude` function #46

Closed papb closed 3 years ago

papb commented 3 years ago

Currently, the excludeFn function I pass to crawler.exclude(excludeFn) receives only the basename of the directory as a parameter. I would like to decide to exclude or not based on the full path. I propose passing also path as a second parameter to it, so it is not a breaking change.