Sha256: 447c6a44e4650635bdc24f3999dd51e5677500d36ed9ea787f47f07dff3f8cfc
Contents?: true
Size: 457 Bytes
Versions: 2
Compression:
Stored size: 457 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.5) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspactor-0.7.0.beta.3 | bin/inotify_watch |
rspactor-0.7.0.beta.2 | bin/inotify_watch |