why use NSURLs for file paths?
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.