The current mechanism for filtering events is to inspect the Op bitmask:
if event.Op&fsnotify.Create == fsnotify.Create {
In howeyc/fsnotify there is a WatchFlags
method to filter operations. WatchFlags was removed in 10e1440 (v0.10.0) because:
@nightlyone pointed out that it still is desirable to specify filters so the kernel doesn't need to wakeup our thread/process for an event we'll just ignore.
Some research (API doc) reveal differences from one OS to the next:
NOTE_CREATE
), much less a filter for it.FILE_NOTIFY_CHANGE_FILE_NAME
that covers Create, Remove and Rename. An event does indicate which one of these it is, but some user-space filtering is still necessary.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4