inotify-cxx documentation

Requirements

Linux kernel 2.6.13 or later (with inotify compiled in)

inotify header(s) installed in <INCLUDE_DIR>/sys. The most common place is
/usr/include/sys. Some Linux distributions contain only
inotify.h which defines everything needed. But sometimes must
be used inotify.h and inotify-syscalls.h as available e.g. at
this page (see inotify - Download).

How to use

Include inotify-cxx.h into your sources and add
inotify-cxx.cpp for compiling (e.g. through your makefile).
Building a (static or shared) library is also possible.

If you have installed it into your system-wide include dir (e.g.
/usr/include), use
#include <inotify-cxx.h> or similar.
Otherwise use #include "inotify-cxx.h".

For thread-safe behavior, define the INOTIFY_THREAD_SAFE symbol
(eg. -DINOTIFY_THREAD_SAFE on gcc's command line). See documentation
for details about thread safety. Please remember that this feature hasn't been
well tested yet.

Example program

Thomas Jarosch created a simple example program showing practical use of inotify-cxx.
Its source code can be downloaded here: