How to be notified of file/directory change in C/C++, ideally using POSIX

Michael Neale picture Michael Neale · Sep 14, 2008 · Viewed 19.6k times · Source

The subject says it all - normally easy and cross platform way is to poll, intelligently. But every OS has some means to notify without polling. Is it possible in a reasonably cross platform way? (I only really care about Windows and Linux, but I use mac, so I thought posix may help?)

Answer

aku picture aku · Sep 14, 2008

Linux users can use inotify

inotify is a Linux kernel subsystem that provides file system event notification.

Some goodies for Windows fellows: