Re: Problems with CurlHandle
Re: Problems with CurlHandle
- Subject: Re: Problems with CurlHandle
- From: p3consulting <email@hidden>
- Date: Sun, 22 May 2005 10:20:59 +0200
-(NSString *)uploadOneFile: (NSString *)inFilePath // @"/User/me/File"
toHost:(NSString *)inHost // @"ftp.apricle.org"
withUserName:(NSString *)inUsername // @"user"
andPassword:(NSString *)inPassword // @"dukeflop"
andDirectoryOnHost:(NSString *)inDirectory // @"/remote/mov/"
{
NSString *urlString = [NSString stringWithFormat:
@"ftp://%@:%@@%@/%@/%@", inUsername,
inPassword,
inHost,
inDirectory,
[inFilePath lastPathComponent]];
NSURL *url = [NSURL URLWithString:urlString];
CURLHandle *urlHandle = (CURLHandle *)[url URLHandleUsingCache:NO];
A cast just makes the compiler warning disappears, it doesn't convert
the NSURL instance into a CURLHandle one…
You have (at least) to
CURLHandle *urlHandle = [[CURLHandle alloc] initWithURL:url cached:NO] ;
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
_______________________________________________
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