Re: How to get the file path to my application
Re: How to get the file path to my application
- Subject: Re: How to get the file path to my application
- From: Preston Jackson <email@hidden>
- Date: Wed, 30 Jul 2008 22:29:33 -0600
In general, NSBundle is a good resource for this.
Try:
NSString* applicationPath = [[NSBundle mainBundle] bundlePath];
This will tell you the path of the application bundle (Fred.app) and
then you'll have to step up one element in the applicationPath to get
the parent directory.
Preston
On Jul 30, 2008, at 10: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?
Thanks
_______________________________________________
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
_______________________________________________
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