fswatch
A cross-platform file change monitor with multiple backends
... in FreeBSD 4.1 and supported on most BSD systems (including OS X). A monitor based on inotify, a Linux kernel subsystem that reports file system changes to applications. A monitor based on File Events Notification, a Solaris/Illumos kernel API that reports file events. A monitor based on ReadDirectoryChangesW, a Microsoft Windows API that reports changes to a directory.