• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cleaning up malformed path strings in NSURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: domains for NSUserDefaults
  • Next by Date: Re: domains for NSUserDefaults
  • Previous by thread: Cleaning up malformed path strings in NSURL
  • Next by thread: outlineView:willDisplayOutlineCell:... and disclosue triangles
  • Index(es):
    • Date
    • Thread