I'm trying to detect when a particular file is modified without polling the contents of the file looking for changes.
The server runs Mac OS X, so inotify is not available. My server allows for the use of exec().
How can I achieve this?
Check the filemtime(). You can poll it every so often and it's much easier than looking for changes in the file itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With