Re: Cleaning up malformed path strings in NSURL
Re: Cleaning up malformed path strings in NSURL
- Subject: Re: Cleaning up malformed path strings in NSURL
- From: Ron Fleckner <email@hidden>
- Date: Sat, 15 Apr 2006 17:25:24 +1000
Eamon Ford wrote:
In the docs, it says this in the class description for NSURL:
If you wish to be tolerant of malformed path strings, you’ll need to
use functions provided by the Core Foundation framework to clean up
the strings.
...But I can't seem to find a CF function to clean up malformed path
strings. Which function(s) do they mean?
I'm not sure, BUT, you can use this:
NSURL *myFile = [NSURL fileURLWithPath:chosenFile];
to create a well-formed url. Seems to work with any path that has
spaces, non-ascii characters &etc.
HTH
Ron _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden