Re: FindFolder Equivalent?
Re: FindFolder Equivalent?
- Subject: Re: FindFolder Equivalent?
- From: Doug Whitmore <email@hidden>
- Date: Mon, 7 May 2001 13:23:24 -0700
On Monday, May 7, 2001, at 11:02 AM, rsharp wrote:
On Mon, 7 May 2001, Douglas Davidson 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?
Rick Sharp
Instant Interactive
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Using FSRefMakePath on MacOS X will give you a true POSIX style path,
and you should be able to push that path into a NSString, which you can
then pass to any Cocoa API expecting a path. That may be a bit easier
than the CFURL routethough if it is easier for you to have a URL...
HTH,
Doug
/*
* Good Doug
* Doug Whitmore
* email@hidden
* (408) 974-4243
*/