cURL / Mailing Lists / curl-library / Single Mail

curl-library

Implementing recursive SCP uploads

From: Nick Jensen <nickrjensen_at_gmail.com>
Date: Wed, 26 May 2010 01:10:30 -0400

Hello,

I know that libcurl+libssh2 does not currently support recursive SCP
uploads, and I am prepared to implement it myself, however I am hoping to
get some direction. With SFTP I have no problem. Between the
"CURLOPT_FTP_CREATE_MISSING_DIRS" option, and also QUOTE commands I can
issue a series of MKD's if no directory exists. This has made implementing
recursive SFTP uploads a breeze.

Problem, the url
"scp://localhost:22/folder-that-does-not-exist/some-file.txt" fails with:
/folder-that-does-not-exist/some-file.txt
No such file or directory
Error in the SSH layer
CURLE_SSH (79)

So I obviously need to create this directory first if it does not exist. But
I'm really not sure the best way to accomplish this. There doesn't seem to
be any concept of QUOTE commands... Can someone point me in the direction of
how I might (should) implement recursive SCP uploads?

Thanks

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