Monitoring folder for changes

Is there any gem or code example that would help me to watch a given
folder for changes and trigger a callback upon change detection?

Thanks!

-- Felipe

···

--
Posted via http://www.ruby-forum.com/.

sudo gem install directory_watcher

a @ http://codeforpeople.com/

···

On Mar 27, 2009, at 5:39 PM, Felipe Coury wrote:

Is there any gem or code example that would help me to watch a given
folder for changes and trigger a callback upon change detection?

Thanks!

-- Felipe
-- Posted via http://www.ruby-forum.com/\.

--
we can deny everything, except that we have the possibility of being better. simply reflect on that.
h.h. the 14th dalai lama

Ara Howard wrote:

sudo gem install directory_watcher
a @ http://codeforpeople.com/

Now that was fast! Thanks Ara!

Best regards,

-- Felipe

···

--
Posted via http://www.ruby-forum.com/\.

Felipe Coury <felipe.coury@gmail.com> writes:

Ara Howard wrote:

sudo gem install directory_watcher
a @ http://codeforpeople.com/

Now that was fast! Thanks Ara!

If speed is more important than portability, you may want to consider utilizing operating specific features. I believe Linux, OSX & Windows all provide notifications of changes to the file system so you wouldn't have to periodically poll.

···

--
Brian Adkins
http://lojic.com/