Hi Jim,
Jim Meyering <address@hidden> writes:
> I don't (yet?) see why a tree would be the preferred data structure.
>
> ...
Because inotify doesn't add recursive watchers. For example, you want
to follow by name `/var/foo/bar', and `/var/foo' doesn't exist yet. To
catch the event for the `bar' file creation, you will need to register a
watcher on the /var directory and when the foo subdirectory is created
finally watch the file.
Since different files in different directories can be watched, I thought
to use a tree to propagate events to children nodes.
Though, if you prefer a hash table, approximately the same mechanism can
be adapted without problems.
Regards,
Giuseppe