Skip to content

Instantly share code, notes, and snippets.

@cmhobbs
Created June 6, 2012 17:20
Show Gist options
  • Save cmhobbs/2883397 to your computer and use it in GitHub Desktop.
Save cmhobbs/2883397 to your computer and use it in GitHub Desktop.
require 'fssm'
DIR = %x{pwd}.strip
puts "! WATCHER INITIALIZED"
FSSM.monitor(DIR) do
update do |path, file|
puts "! FILE MODIFIED - #{path}/#{file}"
end
create do |path, file|
puts "! FILE CREATED - #{path}/#{file}"
end
delete do |path, file|
puts "! FILE DELETED - #{path}/#{file}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment