Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 440 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 440 Bytes

mruby-inotify

inotify bindings for mruby.

Usage

notifier = Inotify::Notifier.new

notifier.watch('/home', :all_events) do |event|
  puts event.inspect
end

# .process blocks until events are available
notifier.process while true

Or, to watch a directory tree:

notifier = Inotify::RecursiveNotifier.new

notifier.rwatch('/home', :all_events) do |event|
  puts event.inspect
end

notifier.process while true