Re: inode for a given vnode or filepath.
Re: inode for a given vnode or filepath.
- Subject: Re: inode for a given vnode or filepath.
- From: Quinn <email@hidden>
- Date: Thu, 31 Jul 2008 16:51:44 +0100
At 15:23 +0400 31/7/08, Maxim Zhuravlev wrote:
I would like to find out, how can I get an inode number for a given
vnode or filename.
For a vnode I can use vnode_getattr(), but it requires vfs context as
one of it's parameters. I can get the context by using
vfs_context_current(), but it seems to be in
com.apple.kpi.unsupported. Are there any other *supported* ways to get
You can create a VFS context for the current thread by calling
vfs_context_create, passing NULL to the ctx parameter.
And at last, does inode number and/or device id change over time and,
if they do, under what circumstances?
That's a complex question. We discussed it recently over
<email@hidden>. If you search the list archive for
"inode number", you'll find lots of useful info. Specifically, the
thread "Can i rely on inode numbers?".
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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