#notifications #cross-platform #async #watcher #watch #fsw

async-fsw

Cross-platform asynchronous filesystem notification library for Rust

2 unstable releases

0.2.0 May 23, 2020
0.1.0 May 4, 2020

#28 in #watcher

MIT license

5KB
61 lines

Cross-platform asynchronous filesystem notification library for Rust.

This library allows for asynchronous observation of filesystem changes. This project is built on top of async-std an notify projects.

Example

use async_fsw::{Watcher, WatchMode};

let mut w = Watcher::new();
w.set_path("/tmp", WatchMode::Recursive);
w.observe().await;

while let Some(event) = w.incomming().recv().await {
    println!("Event: {:?}", event);
}

Dependencies

~5–18MB
~196K SLoC