Re: Advice wanted on how to proceed . . .
Re: Advice wanted on how to proceed . . .
- Subject: Re: Advice wanted on how to proceed . . .
- From: Ronnie Misra <email@hidden>
- Date: Wed, 5 Jul 2006 08:52:35 -0700
On Jul 5, 2006, at 3:42 AM, Quinn wrote:
At 23:42 -0400 4/7/06, Bruce Fancher wrote:
Because, unless I am mistaken, launchd can only watch a single
directory.
That's more-or-less correct. launchd uses kqueues to monitor for
changes in a directory, and this approach requires to you open a
file descriptor for each directory you want to monitor. Clearly
that doesn't scale.
I want to watch any directory, anywhere on the file system, or at
least,
anywhere in my home directory.
The ability to receive notification about changes across the entire
file system is a much requested feature. Kauth is the only
supported solution for this right now. However, as you've noted, it
involves kernel code, and that /always/ complicates matters.
You might want to investigate piggybacking on top of the mechanism
used by Spotlight (/dev/fsevents). This is very much /unsupported/:
we can't guarantee that it will be around, or work the same way, on
future systems. If you were developing shrinkwrap software, I would
strongly recommend AGAINST using this, as it's likely that you
software would stop working on future systems. However, from your
post, it seems like you're just working on a solution for yourself,
and I'm sure you can live with the trauma of it breaking (-:
We're hoping to provide a better solution to the global file system
notification problem in future systems, but there are no concrete
plans that I can disclose at this moment.
Bruce,
You mentioned spotlight importers earlier in this thread. Writing a
spotlight importer might be better than hooking /dev/fsevents -- you
can then write user-space code that will fire whenever a .webloc file
is written anywhere in your indexed directories...
Ronnie
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden