Re: FindFolder Equivalent?
Re: FindFolder Equivalent?
- Subject: Re: FindFolder Equivalent?
- From: Ali Ozer <email@hidden>
- Date: Sat, 5 May 2001 16:04:37 -0700
>
On Saturday, May 5, 2001, at 04:00 PM, Ali Ozer wrote:
>
>
NSSystemDirectories.h, in /usr/include,
>
> On Saturday, May 5, 2001, at 02:19 PM, Dave Swan wrote:
>
>
>
> I'm new to Cocoa (and the Mac environment in general) and I was
>
> wondering if Cocoa has a method that is equivalent to the Carbon
>
> FindFolder function. I don't want to hard code paths in my source if
>
> I can help it.
Gasp, this was meant to say more.
There is two low-level functions in /usr/include/NSSystemDirectories.h,
and the somewhat higher level function
NSSearchPathForDirectoriesInDomains() in Foundation/NSPathUtilities.h.
These will return to you the paths for various common top level
directories in various domains. In some cases you might have to append a
hard-wired component to the path. (For instance, there are no selectors
for the various subdirectories in Library.)
Ali