Re: Identifying if a bundle is an app
Re: Identifying if a bundle is an app
- Subject: Re: Identifying if a bundle is an app
- From: Chris Hanson <email@hidden>
- Date: Fri, 2 Jan 2004 15:48:49 -0600
On Jan 2, 2004, at 1:21 PM, Jesus De Meyer wrote:
I've been looking for a way to indetify if a bundle is an application
but haven't found anything. First I though about checking for the .app
suffix, but I have apps that don't have an extension. I also can't
check for the creator type as bundles show up as directories.
You can use Launch Services to do this. Use LSCopyItemInfoForRef to
get all flags for an item, and then check its kLSItemInfoIsApplication
bit in the resulting LSItemInfoRecord. The function, flag, and
structure definitions for this are in <LaunchServices/LSInfo.h> within
the ApplicationServices umbrella framework.
It'd be useful if -[NSFileManager fileAttributesAtPath:traverseLink:]
would return this information...
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.