Re: Determining regular files using Carbon calls?
Re: Determining regular files using Carbon calls?
- Subject: Re: Determining regular files using Carbon calls?
- From: Quinn <email@hidden>
- Date: Fri, 6 Jun 2008 23:09:31 +0100
At 17:41 -0400 6/6/08, Trainor, Chris wrote:
The d_type field in the dirent struct can be used to determine if a
file is a regular file, directory, symlink, etc. Is there a way to
determine if a file is a regular file using Carbon calls?
You can extract the UNIX file type from the mode field in the
permissions field in the FSCatalogInfo, in much the same way you
would for <x-man-page://2/stat>.
$ FSMegaInfo -vvv FSGetCatalogInfo -kFSCatInfoPermissions
/var/run/portmap.socket
name = 'portmap.socket'
catalogInfo:
permissions:
userID = 0 (root)
groupID = 1 (daemon)
reserved1 = 0
mode = 0x0000c1c0 (srwx------)
0x0000c1c0 = 0140700 = S_IFSOCK | S_IRWXU
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.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden