cURL / Mailing Lists / curl-library / Single Mail

curl-library

directory transfers with ftp

From: Chris Silverberg <chris_at_silverberg.net>
Date: Tue, 30 Mar 2004 15:18:25 -0800

Hi folks,

I'm working on a project to use the C interface of libcurl to perform
ftp downloads and uploads. Single file downloads are of course easy to
accomplish... and I've done that complete with a GUI progress window,
etc. All very straight-forward and fast. But now I need to support
downloading and uploading directories, perhaps with subdirectories.
 From my reading of the API's, it doesn't look like libcurl has any
special support for this, so I'll essentially be layering on top of
libcurl to do this.

For example, to download a directory, i'll download the directory
listing, then I'll have to parse it (probably using
http://cr.yp.to/ftpparse.html), and then iterate through and handle
each file/directory individually. I'll probably have to do a pre-scan
to collect the total bytes if I want an accurate progress window. Does
that sound about right? Does anyone have any tips/suggestions based on
previous experience?

thanks much,
Chris
Received on 2004-03-31