cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SCP -r equivalent in curl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 11 Jul 2008 08:26:34 +0200 (CEST)

On Thu, 10 Jul 2008, Scott Barrett wrote:

> I've noticed that scp supports recursive transfer of directories with a -r
> flag. Having (somewhat painfully) implemented a similar capability atop
> libcurl using sftp, I became curious whether use of an scp URL for a
> directory (with a trailing slash) might automagically behave recursively.
> Alas, no.
>
> Further investigation leads me to believe that libssh2 doesn't support the
> recursive transfer of directories. Am I correct? It would seem pretty
> handy, particularly if a single scp operation can transfer a directory tree
> more efficiently than multiple sftp operations.

I don't know exactly what libssh2 supports for this off the top of my head,
but even if it _would_ have support for it I don't see how it would be nicely
integrated into libcurl anyway. We just don't have any notion for multiple
downloads so it would require new "stuff" for that.

For libssh2 details, try the libssh2-devel list or its source code...

-- 
  / daniel.haxx.se
Received on 2008-07-11