Re: File level action protocol
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jul 9, 2005, at 12:50 AM, Thomas Tempelmann wrote: If the delayed notification is acceptable, how long a delay can you tolerate? Ok. It sounds like the asynchronous interface that Spotlight uses will probably be your best bet. lookup passes a parent object and a name fragment to a filesystem and gets back a child object or an error. You can also look up by a file ID instead of parID+name, right? So, all I need is to know a file's ID for my project. On some filesystems, yes. Lookups performed by fileid may not have a meaningful parent identifier at all But you want to know about "all" files, and there may be many files *not* on HFS+ As long as I can learn the File ID while I do the recording, I should be fine. So, what I need then is a (later) association between a vnode and a File ID. Path. Isn't the Vnode identified by a unique number that is, like the dir and file ID, remaining constant as long as its file/dir exists? Can I record this vnode number when I get a "file change" notification? If you're using the spotlight-style interface, you'll get a path which can be converted in user space to a File ID. On the KAUTH-based interface, you can fetch a path for the vnode. = Mike _______________________________________________ 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... Several seconds are no problem. On HFS+, they do, and that's all I care about. The interfaces available to you use paths, not File IDs. You can translate these, but again be aware that some volume formats do (can) not support persistent File IDs. The file handle is not relevant at the layer you're interested in; it's a per-process association between a descriptor number and a vnode. Because File IDs are (can) not be ubiquitous, the kernel doesn't use them; it has some mechanisms for looking things up by ID, but they're not otherwise useful. This email sent to site_archiver@lists.apple.com
participants (1)
-
Mike Smith