Re: NSSavePanel does replace / in the filename with a :
Re: NSSavePanel does replace / in the filename with a :
- Subject: Re: NSSavePanel does replace / in the filename with a :
- From: Ken Thomases <email@hidden>
- Date: Mon, 18 Oct 2010 10:29:06 -0500
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 (email@hidden)
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:
This email sent to email@hidden