[ANN] directory_watcher 1.3.0

T

Tim Pease

directory_watcher version 1.3.0
by Tim Pease
http://codeforpeople.rubyforge.org/directory_watcher

== DESCRIPTION

DirectoryWatcher is a class for watching files within a directory and
generating events when those files change. This latest release adds
support
for Rev and EventMachine based file notifications. These libraries are
more
efficient than the default Ruby thread loop that polls the entire
directory
at a regular interval.

This example shows how to receive notifications for all ruby files in
the
current directory (and all its subdirectories) using the Rev library for
notifications.

dw = DirectoryWatcher.new('.', :glob => '**/*.rb', :scanner => :rev)
dw.add_observer {|*args| args.each {|event| puts event}}
dw.start

The supported :scanner options are:

:em => EventMachine
:rev => Rev
nil => default Ruby thread loop

== CHANGES

* 2 major enhancements
- added support for Rev based notifications
- added support for EventMachine based notifications

== INSTALL

gem install directory_watcher

You will need to install the "eventmachine" and / or "rev" gems if you
wish to
use either for file notifications.

== LINKS

GitHub: http://github.com/TwP/directory_watcher
Rubyforge: http://codeforpeople.rubyforge.org/directory_watcher


Blessings,
TwP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top