jruby-notify is a thin wrapper around the JNotify library, a java library that allow java application to listen to file system events, such as:
- File created
- File modified
- File renamed
- File deleted
The gem is written for JRuby and uses the JNotify library that supports the following platforms:
- Windows (2000 or newer)
- Linux with INofity support (2.6.14 or newer)
- Mac OS X (10.5 or newer)
Please have a look at the platform specific notes on the JNotify page.
gem install jruby-notify
require 'jruby-notify'
notify = JRubyNotify::Notify.new
notify.watch Dir.pwd do |path, file|
puts "Detected change in: #{ File.join(path, file) }"
end
notify.run
There are other gems that provides almost the same functionality for MRI:
- rb-fsevent for Mac OS X
- rb-inotify for Linux
- rb-fchange for Windows
- wdm for Windows
Developed by Michael Kessler, mksoft.ch.
If you like JRuby Notify, you can watch the repository at GitHub and follow @netzpirat on Twitter for project updates.
- Issues and feature request hosted at GitHub Issues.
- Documentation hosted at RubyDoc.
- Source hosted at GitHub.
Pull requests are very welcome! Please try to follow these simple rules if applicable:
- Please create a topic branch for every separate change you make.
- Make sure your patches are well tested. All specs must pass.
- Update the Yard documentation.
- Update the README.
- Update the CHANGELOG for noteworthy changes.
- Please do not change the version number.
See the CHANGELOG and the GitHub list of contributors.
Omry Yadan for writting the JNotify library and Matthew Donoughe for providing the Mac OS X support.
This Ruby gem is released under the MIT license. The JNotify library is released under the LPGL license.