Re: FindFolder Equivalent?
Re: FindFolder Equivalent?
- Subject: Re: FindFolder Equivalent?
- From: Douglas Davidson <email@hidden>
- Date: Mon, 7 May 2001 11:44:05 -0700
On Monday, May 7, 2001, at 11:02 AM, rsharp wrote:
In addition to what Ali said, I would like to add that there is nothing
preventing you from using FindFolder from within a Cocoa application,
if
you find that it has functionality that you want that is not in
NSSystemDirectories.h. The NSSystemDirectories.h functions are more
convenient from within Cocoa, because they return paths that can be
used
directly by the Cocoa APIs, but FindFolder does have some functionality
that they do not.
This is probably what I'll be doing. BTW, I've heard that CFString and
NSString are basically the same thing. Is this also true of other CF
types (e.g. CFURL)? I would imagine that you'd thus do something like:
* FindFolder to obtain an FSSpec
* Convert FSSpec to an FSRef
* Obtain the path of the FSRef as a CFURL
* Pass the (coerced?) CFURL into Cocoa API's (whatever takes NSURL).
Is this correct?
That sounds fine. I believe CFURL and NSURL are bridged, although not
all such pairs are--for example, CFBundle and NSBundle are not.
Douglas Davidson