Registry / utility / notify-debouncer-mini

notify-debouncer-mini

JSON →
library0.7.0rscratesunverified

A minimal debouncer for file system events, reducing the frequency of notifications from the notify crate.

# Cargo.toml [dependencies] notify-debouncer-mini = "0.7.0"
INSTALL
IMPORT
SIG · NOTIFY-DEBOUNCER-M
N
notify-debouncer-mini
utilityrustv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

new_debouncer
use notify_debouncer_mini::new_debouncer;

Creates a debouncer that batches file system events every 2 seconds.

use notify_debouncer_mini::new_debouncer; use notify::RecursiveMode; use std::time::Duration; let mut debouncer = new_debouncer(Duration::from_secs(2), |result| { match result { Ok(events) => println!("Events: {:?}", events), Err(e) => eprintln!("Error: {:?}", e), } }).unwrap(); debouncer.watcher().watch("/path/to/watch", RecursiveMode::Recursive).unwrap(); std::thread::sleep(Duration::from_secs(10));
Debug
Known issues
gotchaRequires the notify crate as a dependency with the default feature 'macos_fsevent' on macOS.
fix
Add notify to your Cargo.toml and ensure the 'macos_fsevent' feature is enabled for macOS.
affects: >=0.7.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
notify-debouncer-mini — cargo add notify-debouncer-mini · libregistry