• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining regular files using Carbon calls?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Determining regular files using Carbon calls? (From: "Trainor, Chris" <email@hidden>)

  • Prev by Date: Determining regular files using Carbon calls?
  • Next by Date: devesh sreenivasan sent you a Friend Request on Yaari
  • Previous by thread: Determining regular files using Carbon calls?
  • Next by thread: devesh sreenivasan sent you a Friend Request on Yaari
  • Index(es):
    • Date
    • Thread