site_archiver@lists.apple.com Delivered-To: Darwin-kernel@lists.apple.com On Jul 5, 2006, at 3:42 AM, Quinn wrote: Bruce, Ronnie _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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. 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ronnie Misra