Filesys::Notify::Simple - Simple and dumb file system watcher



NAME

Filesys::Notify::Simple - Simple and dumb file system watcher


SYNOPSIS

  use Filesys::Notify::Simple;
  my $watcher = Filesys::Notify::Simple->new([ "." ]);
  $watcher->wait(sub {
      for my $event (@_) {
          $event->{path} # full path of the file updated
      }
  });


DESCRIPTION

Filesys::Notify::Simple is a simple but unified interface to get notifications of changes to a given filesystem path. It utilizes inotify2 on Linux and fsevents on OS X if they're installed, with a fallback to the full directory scan if they're not available.

There are some limitations in this module. If you don't like it, use the File::ChangeNotify manpage.

In return, this module doesn't depend on any non-core modules. Platform specific optimizations with the Linux::Inotify2 manpage and the Mac::FSEvents manpage are truely optional.


AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>


LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


SEE ALSO

the File::ChangeNotify manpage the Mac::FSEvents manpage the Linux::Inotify2 manpage

 Filesys::Notify::Simple - Simple and dumb file system watcher