cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl: SFTP return quote command failure (21)

From: chu ngoc hung <hungcn_at_gmail.com>
Date: Tue, 26 Feb 2013 14:24:20 +0700

Hi Nick,

I looked at in the man page and saw that: The valid SFTP commands are:
chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink. But I
don't know the exact command to list file in a directory.
Can you help me to point it?

Thanks!

On Tue, Feb 26, 2013 at 2:05 PM, Nick Zitzmann <nick_at_chronosnet.com> wrote:

>
> On Feb 25, 2013, at 9:35 PM, chu ngoc hung <hungcn_at_gmail.com> wrote:
>
> > I use CURLOPT_QUOTE command to list content of a directory. Here is my
> code:
> >
> > // set url
> > //...
> >
> > headerlist = curl_slist_append(headerlist, buf_0);
> > const char *buf_1 = "CWD /hungcn";
>
> That is not a valid SFTP quote command. Go check the man page for
> curl_easy_setopt for the list of valid commands. I wrote this code a long
> time ago, and when I did it used the same command names as OpenSSH's sftp
> tool, but that might have changed. Also, note that all of the commands are
> lower-case.
>
> […]
> > curl_easy_setopt(_curl, CURLOPT_CUSTOMREQUEST, "LIST");
>
> The CURLOPT_CUSTOMREQUEST command is for sending custom HTTP request
> commands, like WebDAV's OPTIONS or PROPFIND commands. It has no effect with
> SFTP URLs.
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
>
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Chu Ngọc Hưng
Hanoi University Of Technology
Tel:+84904010806
E-Mail: hungcn_at_gmail.com, or ngochunghutit_at_yahoo.com

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