cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question on using libcurl for FTP.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Jun 2003 23:32:50 +0200 (CEST)

On Mon, 23 Jun 2003, Wei Weng wrote:

> I have three questions on using libcurl for FTP download:
>
> 1: how do I download a directory recursively?

You fetch the root dir, figure out the names of all subdirectories, then you
get all the subdirectories and figure out what subdirectories they have and
get their subdirectories...

libcurl has no built-in functionality for recursive downloading. You need to
provide that logic yourself.

> 2: Is there anyway to set the option for it to download directory
> recursively or NOT recursively?

libcurl never downloads recursively, so no.

> 3: Is there anyway to specify wildcard in filenames when downloading files?
> say specify "ftp://myhost.com/pub/*.txt" will only download all the files
> with extension "txt".

Same here. This is not provided by libcurl, libcurl will only provide you with
a list of directory entries, you decide what to do with it.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Received on 2003-06-23