Skip to content

Instantly share code, notes, and snippets.

@samullen
Created December 21, 2009 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samullen/260807 to your computer and use it in GitHub Desktop.
Save samullen/260807 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rb-inotify'
notifier = INotify::Notifier.new
notifier.watch("/path/to/watch", :moved_to, :create) do |event|
puts "I found #{event.name}!"
end
notifier.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment