• 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
why use NSURLs for file paths?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why use NSURLs for file paths?


  • Subject: why use NSURLs for file paths?
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 14 May 2002 00:05:00 -0700

The documentation says: "NSURLs can be used to refer to files, and are in
fact the **preferred** way to do so. ApplicationKit objects that can read
or write data from or to a file generally have methods that accept an NSURL
instead of a pathname as the file reference." (My emphasis.)

I have not found this to be so. Most things I want to do with files take a
path (string), not an NSURL. Furthermore, NSURLs are darned difficult to
manipulate; why, there isn't even a Cocoa method for dealing the percent
escaped encoding.

After trying to obey the documentation's above-quoted moral directive, I
gave up on NSURLs and started using strings instead, and my life suddenly
got vastly easier. Is there really any reason to believe what the
documentation says here? m.

--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: why use NSURLs for file paths?
      • From: Lance Bland <email@hidden>
  • Prev by Date: why register for dragged types?
  • Next by Date: Re: When will drag'n'drop to the Finder work? (promiseHFS)
  • Previous by thread: Re: why register for dragged types?
  • Next by thread: Re: why use NSURLs for file paths?
  • Index(es):
    • Date
    • Thread