inotify_cr
Tracks file creations and deletions in a directory. This project was meant to help me learn a bit about creating C library bindings. Don't take it too seriously. If you need a properly built tool with similar functionality then please look at inotify-tools.
Building
Building this requires Crystal 1.6.1 or better and Linux
with
GNU libc
crystal build src/watch.cr
Usage
./watch path-to-directory
Once you start the application, it will log lines as below for
every file create and delete. This will only work on file systems
that inotify
supports.
DELETED: file1
DELETED: file2
DELETED: file3
DELETED: file5
CREATED: file1
Contributing
- Fork it (https://github.com/kwalter94/inotify_cr/fork)
- 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
- Walter Kaunda - creator and maintainer