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: Lutz Helwing <email@hidden>
- Date: Thu, 31 Jul 2008 14:07:23 +0200
To get the inode number from a path you can simply use stat(). The inode
is stored in st_inode within the stat structure.
Cheers,
lutz
-----Original Message-----
From: "Maxim Zhuravlev" <email@hidden>
To: email@hidden
Date: Thu, 31 Jul 2008 15:23:51 +0400
Subject: inode for a given vnode or filepath.
Hi, all.
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
inode number (va_fileid in vnode_attr structure) and device id
(va_fsid in vnode_attr structure)?
And at last, does inode number and/or device id change over time and,
if they do, under what circumstances?
Thanks in advance,
- Maxim.
_______________________________________________
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
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
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