inotify-fixed v1.0.1
inotify
Inotify bindings for Crystal language.
Installation
Add this to your application's shard.yml
:
dependencies:
inotify:
github: petoem/inotify.cr
version: 1.0.1
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
- Fork it!
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- petoem Michael Petö - creator, maintainer
Repository
inotify-fixed
Owner
Statistic
- 0
- 0
- 0
- 1
- 0
- over 1 year ago
- May 9, 2023
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 05:51:21 GMT
Languages