Re: No ftp:// support in NSURL?
Re: No ftp:// support in NSURL?
- Subject: Re: No ftp:// support in NSURL?
- From: Christopher Anand <email@hidden>
- Date: Tue, 26 Feb 2002 13:26:50 -0500
The ftp address is missing the hostname.
On Tuesday, February 26, 2002, at 01:04 PM, Gerben Wierda wrote:
When I run the following program, I get a warning that the ftp download
failed but the http download was succesful.
/* to compile this file (urltest.m):
cc -Wall -framework Foundation urltest.m -o urltest
*/
#define MYHTTPURL
@"http://www.omnigroup.com/ftp/pub/software/Source/MacOSX/Applications/Launcher-2000-06-02.
tar.gz"
#define MYFTPURL
@"ftp://pub/software/Source/MacOSX/Applications/Launcher-2000-06-02.tar.gz"
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool;
NSURL *ftpurl, *httpurl;
pool = [NSAutoreleasePool new];
ftpurl = [NSURL URLWithString:MYFTPURL];
httpurl = [NSURL URLWithString:MYHTTPURL];
if (![httpurl resourceDataUsingCache: NO]) {
NSLog( @"Could not download http test data");
}
if (![ftpurl resourceDataUsingCache: NO]) {
NSLog( @"Could not download ftp test data");
}
[pool release];
}
Is that an omission in NSURL or is there something I can do about this?
Thanks,
G
_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
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.