• 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: URI de/encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URI de/encoding


  • Subject: Re: URI de/encoding
  • From: gnat <email@hidden>
  • Date: Thu, 18 May 2006 13:04:40 -0400

On May 18, 2006, at 10:41, Jim Correia wrote:

<http://developer.apple.com/documentation/Cocoa/Reference/ Foundation/ObjC_classic/Classes/NSString.html#//apple_ref/occ/instm/ NSString/stringByAddingPercentEscapesUsingEncoding:>

<http://developer.apple.com/documentation/Cocoa/Reference/ Foundation/ObjC_classic/Classes/NSString.html#//apple_ref/occ/instm/ NSString/stringByReplacingPercentEscapesUsingEncoding:>

Jim,
Thanks. I looked in NSString (and NSURL) first, but I sometimes miss the obvious :/


The documentation for -[NSURL path] says:

<http://devworld.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSURL.html#//apple_ref/occ/instm/NSURL/path>

"If isFileURL returnsYES, the return value is suitable for input into NSFileManager or NSPathUtilities."

It sounds like you are passing something else to the file manager.

I saw that, so i'm not sure what is going on. The XML file I am loading is "~/Music/iTunes/iTunes Music Library.xml" which gets loaded into an NSDictionary object. When I get to that point, I pull the Location object out of a Track and store it in a NSString. This path looks something like "file://localhost/Users/gnat/Music/iTunes/ iTunes Music/Compilations/Vespertine/01 Hidden Place.mp3" and my target NSString would look like "file://localhost/Volumes/test/ Music/01 Hidden Place.mp3". If I pass this to copyPath:, it returns false (and I can't find an error message anywhere). If I strip the "file://localhost" and replace the s with spaces, the copy works fine.
Now that i've figured out how to use the handler: option, the error it is reporting is "Couldn't open" and the Path is the source (there isn't a ToPath being populated). One thing I do notice is that the Path is missing the second / after file: (i.e. file:/localhost instead of file://localhost), but when I use NSLog to log my source NSString after copyPath: returns FALSE they are both there.


Thanks,
-dave
_______________________________________________
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


  • Follow-Ups:
    • Re: URI de/encoding
      • From: Jim Correia <email@hidden>
    • Re: URI de/encoding
      • From: Chris Parker <email@hidden>
References: 
 >URI de/encoding (From: gnat <email@hidden>)
 >Re: URI de/encoding (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: URI de/encoding
  • Next by Date: Re: How do I find out if a process is running if I have the process Name?
  • Previous by thread: Re: URI de/encoding
  • Next by thread: Re: URI de/encoding
  • Index(es):
    • Date
    • Thread