When I do that, the conversion from NSString to const UInt8 * path mangles the 
special characters in the path.




________________________________
From: Stephen J. Butler <stephen.but...@gmail.com>
To: Cocoa-Dev List <cocoa-dev@lists.apple.com>
Sent: Saturday, April 25, 2009 5:48:09 PM
Subject: Re: Why is NSString->FSRef so hard?

On Sat, Apr 25, 2009 at 7:28 PM, Erg Consultant
<erg_consult...@yahoo.com> wrote:
> I was using CFURLGetFSRef passing in the NSString which works fine as long as 
> the path contains no special chars. If it does, CFURLGetFSRef returns nil.

CFURLGetFSRef is great if what you have originally is a CF/NSURL. But
if you just have an NSString, you might as well use FSPathMakeRef with
[aString fileSystemRepresentation]. No reason to create an
intermediary NSURL.
_______________________________________________

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/erg_consultant%40yahoo.com

This email sent to erg_consult...@yahoo.com



      
_______________________________________________

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