cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp enhancement - FTP wildcard download

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 26 Dec 2009 00:15:29 +0100 (CET)

On Tue, 22 Dec 2009, Pavel Raiskup wrote:

Hey, sorry it took me a while to respond. Christmas and all got in the way!
;-)

> I would like to make some work on TODO 11.5
> http://curl.haxx.se/docs/todo.html#ftp_wildcard_download
>
> I propose to extend libcurl of about new callback function, which can be
> called on start/end of downloading concrete file. Setting url should stay
> unchanged, not breaking the backward compatibility.

I would prefer that metadata callback to get called before any data is
delivered, so that an app could get to know the file name etc before any data
is downloaded. I would also like to see the entire wildcard concept disabled
by default and only enabled with a standard libcurl option so that it won't
break any existing apps.

That metadata callback could then also perhaps be allowed to skip files the
client deems unnecessary to get...

> Would anybody object if I implemented it this way? This is only concept and
> advices are welcome.

As I also mentioned on IRC, the concept should be protocol agnostic enough so
that it can be introduced for SFTP and FILE as well, should someone get the
inspiration to do it.

Still not really figured out is if the matching should be done client-side by
libcurl or server-side by the server - I expect FTP servers to provide
different matching support for example. Also, if done client-side it might be
easier to provide the same matching concept not only between different FTP
servers but also in the future between FTP and SFTP downloads etc.

I also think it's worth to consider and think about what this suggested
feature does NOT include. Like recursive downloads. Or what happens if the
pattern matches a directory name?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-26