Sha256: c0925c08a32e005bac038c3d97b24663a9fc9beae9b306d2fe033c3623ed0469
Contents?: true
Size: 458 Bytes
Versions: 4
Compression:
Stored size: 458 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'rb-inotify' folders = Array.new notifier = INotify::Notifier.new notifier.watch(ARGV.first || '.', :modify, :recursive) do |event| dir = File.expand_path(File.dirname(event.absolute_name)) + '/' if !folders.include?(dir) folders << dir end end while true do notifier.process if !folders.empty? $stdout.puts folders.join(' ') $stdout.flush folders.clear end sleep(0.1) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
guard-0.1.1 | bin/inotify_watch |
guard-0.1.0 | bin/inotify_watch |
guard-0.1.0.beta.2 | bin/inotify_watch |
guard-0.1.0.beta.1 | bin/inotify_watch |