On Oct 18, 2010, at 3:20 AM, Uli Kusterer wrote:

> -> If you're converting between POSIX/Cocoa paths and CoreServices file 
> manager paths, use the existing conversion calls. CFURLRef includes some neat 
> methods to let you convert between both kinds of paths. In any case, Apple's 
> recommended format handling file paths is CFURLRef/NSURL*. Speaking in Carbon 
> terms, that class wraps information not unlike an FSRef inside it, so it's a 
> much faster and more efficient way of storing file references than paths (at 
> least on 10.6 and later, where this actually got implemented). You can even 
> get back alias-like data for storing on disk by grabbing the "bookmark data" 
> from a NSURL.

And if you're working with APIs which take FSRefs, take a look at 
FSPathMakeRef[WithOptions].  (CFURL can perform this same conversion, but it 
takes a couple of steps.)

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to