Skip to content

A Rust library for conveniently watching and handling file changes.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

francesca64/hotwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hotwatch

Cargo Version Build Status

Documentation

hotwatch is a Rust library for comfortably watching and handling file changes. It's a thin convenience wrapper over notify, allowing you to easily spawn handlers.

Nightly Rust is required, since I used the box keyword a few times. Sorry.

use hotwatch::{Hotwatch, Event};

let mut hotwatch = Hotwatch::new().expect("Hotwatch failed to initialize.");
hotwatch.watch("war.png", |e: Event| {
    if let Event::Write(path) = e {
        println!("War has changed.");
    }
}).expect("Failed to watch file!");

About

A Rust library for conveniently watching and handling file changes.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Languages