Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Sane cross-platform file system change monitoring for Event Machine
Ruby
tag: v0.0.4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.document
.gitignore
LICENSE
README.md
Rakefile
VERSION

README.md

em-dir-watcher: real directory monitoring for EventMachine

Employs FSEvents, inotify or Win32 Directory Change Notifications APIs under EventMachine. (Forks a subprocess for blocking watchers.)

Usage

require 'rubygems'
require 'em-dir-watcher'

EM.run {
    dw = EMDirWatcher.watch '.', ['**/*.css', 'lib/**/*.rb'] do |path|
        if File.exists? path
            puts "Modified: #{path}"
        else
            puts "Deleted: #{path}"
        end
    end
    puts "EventMachine running..."
}

Run examples/monitor.rb to see it in action.

License

Copyright (c) 2010 Andrey Tarantsov. Distributed under the MIT license. See LICENSE for details.

Something went wrong with that request. Please try again.