notify 1.0.3

Cross-platform filesystem notification library failed to build notify-1.0.3
Please check the build logs and, if you believe this is' fault, open an issue.


Cross-platform filesystem notification library for Rust.


git = ""

Will be added to the registry as soon as the all the dependencies are published there as well.


extern crate notify;

use notify::{RecommendedWatcher, Error, Watcher};

fn main() {
  // Create a channel to receive the events.
  let (tx, rx) = channel();

  // Automatically select the best implementation for your platform.
  // You can also access each implementation directly e.g. PollWatcher.
  let mut w: Result<RecommendedWatcher, Error> = Watcher::new(tx);

  match w {
    Ok(mut watcher) => {
      // Add a path to be watched. All files and directories at that path and
      // below will be monitored for changes."/home/test/notify"));

      // You'll probably want to do that in a loop. The type to match for is
      // notify::Event, look at src/ for details.
      match rx.recv() {
        _ => println!("Recv.")
    Err(e) => println!("Error")


  • Linux / Android: inotify
  • All platforms: polling (only op::WRITE)


  • Windows: ReadDirectoryChangesW
  • OS X: FSEvents
  • BSD / OS X / iOS: kqueue
  • Solaris 11: FEN

Known Bugs

  • inotify backend panics when dropped
  • polling backend only handles op::WRITEs
  • see TODO comments in the code for more


Inspired by Go's fsnotify, born out of need for cargo watch, and general frustration at the non-existence of C/Rust cross-platform notify libraries.

Written from scratch by Félix Saparelli, and released in the Public Domain.