inotify

Bindings for libinotify bindings inotify
1.0.0 released
petoem/inotify.cr
34 3
Michael Petö

inotify

Inotify bindings for Crystal language.

GitHub release Travis GitHub license

Installation

Add this to your application's shard.yml:

dependencies:
  inotify:
    github: petoem/inotify.cr
    version: 1.0.0

Usage

require "inotify"

# To watch a file or directory ...
watcher = Inotify.watch "/path/to/file.txt" do |event|
  # your awesome logic
end

# ... for 10 seconds.
sleep 10.seconds
watcher.close

Note: You have to run something in the main fiber or else your program will exit.

More documentation can be found here.

Development

To enable logging to STDOUT set INOTIFY_LOG_LEVEL environment variable to DEBUG.

Contributing

  1. Fork it!
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • petoem Michael Petö - creator, maintainer
inotify:
  github: petoem/inotify.cr
  version: ~> 1.0.0
License MIT
Crystal 0.27.0

Authors

Dependencies 0

Development Dependencies 1

  • ameba 0.9.0
    {'github' => 'veelenga/ameba', 'version' => '0.9.0'}

Dependents 1

Last synced .
search fire star recently