Re: NSFileManager
Re: NSFileManager
- Subject: Re: NSFileManager
- From: Chris Parker <email@hidden>
- Date: Tue, 23 Sep 2003 15:16:21 -0700
On Sep 23, 2003, at 6:35 AM, Luca Torella wrote:
Hello,
How can I know what is the folder of the application that is running?
I tried this method to select a folder which where in the same folder
of the app:
NSDirectoryEnumerator *enumer = [[NSFileManager defaultManager]
enumeratorAtPath:@"Files Griglia"];
This method is ok when I debug the application, but when I launch it
from the Finder it doesn't do its job, since it points to my HD.
NSFileManager "thinks" in terms of the UNIX current working directory,
so what you're seeing is the difference between the launch environment
for debugging v. launching from the Finder.
The path to your application's bundle can be found with [[NSBundle
mainBundle] bundlePath]
.chris
--
Chris Parker
Cocoa Frameworks Engineer
Apple Computer, Inc.
_______________________________________________
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.