NSString from .txt file
NSString from .txt file
- Subject: NSString from .txt file
- From: email@hidden
- Date: Mon, 18 Mar 2002 20:49:32 -0800
Is there a way of accomplishing the same thing without using an absolute
path? In other words I want the textFile.txt to reside in the same
folder
as the application and be able to move that folder to any directory
without
breaking any path.
[[NSBundle mainBundle] bundlePath] should return the path to your
application's bundle (i.e. the .app folder containing all your app's
"stuff"). Using the methods in NSPathUtilities.h (which are documented
in Foundation's NSString API reference) should let you concoct the path
you want quite easily.
Good luck!
Ben Haller
Stick Software
_______________________________________________
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.