PathObserver helps you writing program observing for some files or directories easily.
SYNOPSYS
# observing '*.txt' files
require 'rubygems'
require 'path_observer'
observe_manager = PathObserver::ObserveManager.new('*.txt') do |path, result|
puts "#{path} updated on #{result}"
end
observe_manager.observe(:mtime)
# when a '*.txt' is updated, execute constructor block.
# you may be able to exitting from loop in CTRL-C in POSIX environment.
INSTALL
you can install with RubyGems easily.
$sudo gem install path_observer
REQUIREMENT
Ruby 1.8 or later.
Author
Keiji Yoshimi <"walf443__AT__.gmail.com".sub("__AT__", '@')>
THANKS
Yuichi Tateno
License
Ruby License