Skip to content

Commit

Permalink
feat(watcher): Use notify_debouncer_full
Browse files Browse the repository at this point in the history
Based on code by @nyarly, this debounces watch events before filtering
file paths.

`notify_debouncer_full` will do the hard part of making sure spurious
events are sufficiently removed before we match on them. From the
docs:

* Only emits a single Rename event if the rename From and To events can be matched
* Merges multiple Rename events
* Takes Rename events into account and updates paths for events that occurred before the rename event, but which haven't been emitted, yet
* Optionally keeps track of the file system IDs all files and stiches rename events together (FSevents, Windows)
* Emits only one Remove event when deleting a directory (inotify)
* Doesn't emit duplicate create events
* Doesn't emit Modify events after a Create event
  • Loading branch information
Profpatsch committed Apr 30, 2024
1 parent 7442674 commit be5d5d3
Show file tree
Hide file tree
Showing 5 changed files with 537 additions and 142 deletions.
80 changes: 79 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit be5d5d3

Please sign in to comment.