cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Brain-fart question...

From: Emil Romanus <sdac.bithack_at_gmail.com>
Date: Fri, 10 Aug 2007 22:18:37 +0200

2007/8/10, Hall, Scott (GE Healthcare, consultant) <Scott.G.Hall_at_ge.com>:
>
> But what the heck are the sequence of curl_easy*() functions to get a
> list of
> files and their byte sizes (and maybe timestamps) from a remote
> directory?!?
> (ala the FTP "dir" command)

To list an FTP directory, simple set the URL to the wanted directory and
then call curl_easy_perform. You will then have to parse the output
yourself.

Pseudo-code:
curl_setopt(URL, "ftp://host.com/path/");
curl_perform();

That's it. Parse the received information, I recommend D.J. Bernstein's ftp
parser:
http://cr.yp.to/ftpparse.html
Received on 2007-08-10