Re: No ftp:// support in NSURL?
Re: No ftp:// support in NSURL?
- Subject: Re: No ftp:// support in NSURL?
- From: Gerben Wierda <email@hidden>
- Date: Tue, 26 Feb 2002 19:25:57 +0100
Maybe you can put an host in your FTP URL ... ;)
Yes, that was a typo. But the test program came out of an actual
problem. Also *with* a correct ftp URL it does not work:
/* to compile:
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://ftp.omnigroup.com/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];
}
[dumbledore:local/src/i-Installer] root# ./urltest
2002-02-26 19:25:37.127 urltest[3500] Could not download ftp test data
_______________________________________________
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.