cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: I want to delete file from sftp bu libcurl, but...

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 11 Dec 2013 15:30:54 +0100

On Wed, Dec 11, 2013 at 12:27:43PM +0100, Gisle Vanem wrote:
> "ΑυΣ’Ξ°" <506017026_at_qq.com> wrote:
>
> >headerlist = curl_slist_append(headerlist, "rm abc.c");
> >result = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
>
> Maybe the command should be "dele abc.c" under this SFTP-server.

No, the sftp commands are interpreted by libcurl itself and transformed into
the binary sftp protocol form, so it's always "rm". My guess would be that
the path is incorrect (the default isn't where the file is), or a permissions
problem.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-11