• 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
fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles


  • Subject: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
  • From: Mike <email@hidden>
  • Date: Mon, 07 Apr 2008 20:11:06 -0700

I need to get the creator code of my app's bundle without diving into the bundle and reading the plist directly.

My code looks like this:

OSType creator = 0;
NSDictionary *itemDictionary = nil;

itemDictionary = [ defaultFileManager fileAttributesAtPath:enumeratedItem traverseLink:NO ];
if( itemDictionary )
{
creator = [ itemDictionary fileHFSCreatorCode ];
if( creator == kMyAppSignature )
{
// Do some stuff
}
}


The problem is, fileHFSCreatorCode on the returned attributes dictionary always returns 0 or an empty OSType. Is there some other method I need to use to get the creator of bundled apps instead of files?

I know the path at enumeratedItem is correct because I use it for other things in the same routine, which all work.

Thanks,

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
      • From: Jens Alfke <email@hidden>
    • Re: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Apparent bug with button hotkeys that use shift
  • Next by Date: Re: Constraining a NSSlider to Certain Values
  • Previous by thread: Re: Apparent bug with button hotkeys that use shift
  • Next by thread: Re: fileHFSCreatorCode & fileAttributesAtPath:traverseLink on app bundles
  • Index(es):
    • Date
    • Thread