• 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
[NSString setStringWithContentsOfURL] vs. Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Prev by Date: Apple's iTunes Artwork Screensaver
  • Next by Date: [ANN] IsingCocoa - simulation of the Ising model for ferromagnetic material
  • Previous by thread: Apple's iTunes Artwork Screensaver
  • Next by thread: [ANN] IsingCocoa - simulation of the Ising model for ferromagnetic material
  • Index(es):
    • Date
    • Thread