emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
4.96k stars 327 forks source link

filter by file extension #275

Open mobileink opened 3 years ago

mobileink commented 3 years ago

On the topic of filtering, I wonder if it would make sense to support an API that would allow filtering by file extension instead of regexps. I'm guessing that sort of filter could be implemented much more efficiently than with regexps, and I'll bet its a very common use case. Something like myfilter.exts = ["ml", "mli", "mll", "mly"]

mobileink commented 3 years ago

Oops, wrong language. I meant myfilter.exts = {"ml", "mli", "mll", "mly"} (C11)