Created
January 31, 2014 00:45
-
-
Save mislav/8723314 to your computer and use it in GitHub Desktop.
Track filesystem changes on a lower level with Guard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'guard' | |
listener = Guard::Listener.select_and_init '/', | |
:relativize_paths => false, | |
:ignore_paths => ['Caches', 'Saved Application State'] | |
listener.on_change do |files| | |
p files | |
end | |
listener.start | |
stopped = false | |
trap(:INT) { stopped = true } | |
loop do | |
sleep 0.1 | |
break if stopped | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment