Dir Watcher
Dir Watcher is a small Rust library for monitoring filesystem events on a directory.
It wraps the notify crate and exposes an async API
for receiving change events via a Tokio mpsc channel.
Features
- Monitor a directory recursively or non-recursively.
- Ignore specific subdirectories.
- Choose which events to track (all events, file modifications only or file access events).
- Built with Tokio and
notifyand can be integrated in asynchronous applications.
Installation
Add the crate to your Cargo.toml:
[]
= "1.1.0"
Quick start
use ;
use PathType;
async
Options
Options provides a builder style API for configuring a watcher. You can set the
base directory, scan interval, whether the watcher validates the directory on
startup and which subdirectories or events to ignore.
License
This project is released under the MIT license. See LISCENSE for more information.