On Tue, Feb 17, 2009 at 03:03:18PM -0600, Garrett Smith <[email protected]>
wrote:
> First, I'm a new users of libev -- I have to say, this is a terrific
> library. It's *extremely* straight forward to use and very well
> documented. Thanks!
Thanks.
> Has there been any discussion of deepening the integration with
> inotify? Specifically, I'd love the ability to add inotify watches. I
> know that inotify is used in the stat watcher, but stat is limited to,
> well, stat changes :)
No, inotify is extremely linux-dependent, and I will not introduce
features into libev that only work on some platforms (which explains the
semantics of stat watchers).
> For the application I'm working on now, the key functionality missing
> in the stat support is the ability to detect new and deleted files when
> watching a directory.
Well, it should be straightforward enough to simply use inotify yourself.
Note also that stat watchers can usually detect creation of new and
deleted files itself, so if you want to be portable, you could use stat
watchers to speed up detetcion of rare new/delete events by comparing
directories.
In theory, one could expose some of the internal inotify support to allow
creation of inotify watchers, but I would be very reluctant to implement
linux-only functionality.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev