config option for KDirWatch method

Josef Spillner spillner at
Tue Aug 21 15:02:54 BST 2007

On Tuesday 21 August 2007 15:16:02 Flavio Castelli wrote:
> When you "add" a watch over a directory you'll be notified of all changes
> happening inside of it. But you _won't_ be notified when something happens
> inside one of its subfolders.  So, if you want to be reported of _all_ the
> changes happening in a directory, you have to add a watch to the parent
> directory and (recursively) to all its subfolders.

The inotify options are all bitmasks so adding IN_RECURSIVE can't harm, can 
it? It will not drain more resources from the kernel. It could run against 
implementation limits such as inode-based monitoring in inotify, but I've 
never read that particular chapter in the kernel.

I've attached a simple test utility for inotify, ripped from some server 
source code so it's not particularly cleaned up.
It would be truely awesome if we could gain recursive monitoring from inotify 
without having to recurse ourselves. The event handler could return the 
filename as "dir/subdir/file" which would work perfectly well with most 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inotifydir.c
Type: text/x-csrc
Size: 2513 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list