• 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
Recursive Downloads (FTP/CURL?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Re: Updating the main menu
  • Next by Date: Re: NSBezierPath retain crash
  • Previous by thread: Re: NSBezierPath retain crash
  • Next by thread: Re: Recursive Downloads (FTP/CURL?)
  • Index(es):
    • Date
    • Thread