[NSString setStringWithContentsOfURL] vs. Tiger
[NSString setStringWithContentsOfURL] vs. Tiger
- Subject: [NSString setStringWithContentsOfURL] vs. Tiger
- From: m <email@hidden>
- Date: Fri, 13 May 2005 20:01:58 -0700
[NSString setStringWithContentsOfURL] gives different results under
Tiger than it does under Panther even when targeting and building for
10.3.9.
It used to be that calling setStringWithContentsOfURL with an ftp URL
for a directory (eg. "ftp://ftp.apple.com/filemaker") would return a
listing of that directory. Under Tiger it returns an empty string.
Which behavior is correct?
// code:
NSURL* theURL = [NSURL URLWithString: @"ftp://ftp.apple.com/
filemaker"]; // this is a directory
NSString* contentsOfURL = [NSString stringWithContentsOfURL:
theURL];
NSLog(contentsOfURL);
An URL to a text file (i.e. "ftp://ftp.apple.com/filemaker/
distribution.txt") returns the contents of that file, as expected.
I've posted a project which demonstrates this at <http://
muratnkonar.com/stringWithContentsOfURLBug/>. Build in under Tiger
and run it under Tiger and Panther.
_murat
_______________________________________________
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