Search code examples
c++cposix

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


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?)


Solution

  • Linux users can use inotify

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

    Some goodies for Windows fellows: