• 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: How to get the file path to my application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the file path to my application


  • Subject: Re: How to get the file path to my application
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 30 Jul 2008 21:31:17 -0700

On Jul 30, 2008, at 9:21 PM, Randy Canegaly wrote:
If I have a Cocoa application named Fred, how do programmatically (in Fred's code) get the path to the directory where Fred.app is stored?

[[NSBundle mainBundle] bundlePath];

However, if you want to find stuff inside of your application, you should use mainBundle's -pathForResource:ofType: method (and its variants).

b.bum

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >How to get the file path to my application (From: Randy Canegaly <email@hidden>)

  • Prev by Date: Re: How to get the file path to my application
  • Next by Date: Re: How to get the file path to my application
  • Previous by thread: Re: How to get the file path to my application
  • Next by thread: Re: How to get the file path to my application
  • Index(es):
    • Date
    • Thread