• 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: Getting HFS file type of an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting HFS file type of an application


  • Subject: Re: Getting HFS file type of an application
  • From: Finlay Dobbie <email@hidden>
  • Date: Sun, 17 Jul 2005 20:02:18 +0100

On 7/17/05, Steve Palmer <email@hidden> wrote:
> Given a path to an application bundle in the /Applications folder,
> how do I get the HFS file type of the application.  NSHFSTypeOfFile
> requires that the path is pointing to an actual Mach executable so I
> would need to drill down into Contents\MacOS to find the actual
> executable. Is there an equivalent function that will work if the
> path is pointing to the root of the bundle (e.g. Mail.app)?

The HFS file type of an application should always be "APPL". Also,
note that going down to the actual executable and getting the type of
that probably won't work, since the type/creator applies to the bundle
not the executable.

To get this sort of information, you should be using Launch Services
anyway. See <http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/LSRReference/chapter_1.2_section_4.html>.

 -- Finlay
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting HFS file type of an application
      • From: Steve Palmer <email@hidden>
References: 
 >Getting HFS file type of an application (From: Steve Palmer <email@hidden>)

  • Prev by Date: cleanup; dealing with serious errors
  • Next by Date: Re: cleanup; dealing with serious errors
  • Previous by thread: Getting HFS file type of an application
  • Next by thread: Re: Getting HFS file type of an application
  • Index(es):
    • Date
    • Thread