livereload is a tool that helps developers by automatically compile and run a program when file changes are detected.
The inotify API provides a mechanism for monitoring filesystem events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory (from man 7 inotify
).
You can read some good documentation on :
- https://en.wikipedia.org/wiki/Inotify
- https://www.thegeekstuff.com/2010/04/inotify-c-program-example/
- https://www.linuxjournal.com/article/8478
Thanks to John McCutchan for this API.