Recursive Downloads (FTP/CURL?)
Recursive Downloads (FTP/CURL?)
- Subject: Recursive Downloads (FTP/CURL?)
- From: Joe Lester <email@hidden>
- Date: Wed, 12 Nov 2003 14:17:25 -0500
This, hopefully, is an easy question. When my application launches, I
would like to check for the existence of new plugin bundles on a remote
FTP server. New plugins (if any) would then be downloaded and loaded
into my app. The question is... What's the simplest way to download a
remote folder (a bundle in this case) recursively (to get all the files
it contains)?
I've tried the following (typed in Mail) but, of course, it doesn't
work I'm assuming because NSURL wants to see a singe file, not a
directory (PluginBundle.plugin):
NSURL *url = [NSURL
URLWithString:@"
ftp://myServer.com/PluginBundle.plugin"];
NSData *data = [url resourceDataUsingCache:NO]; //data = nil here
[data writeToFile:path atomically:YES]; //of course, fails and returns
NO
These steps work fine for downloading single files. Anyone to the
rescue? Thanks.
_______________________________________________
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.