cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Help - How to enumerate files and directory on a SFTP

From: Ngo Hoa Lan Phuong <orchidanz_at_gmail.com>
Date: Wed, 24 Dec 2008 14:01:42 +0700

> *> I read curl_easy_setopt.3 -- man page and notice that libcurl supports
>> *
>> *> following SFTP commands: chgrp, chmod, chown, ln, mkdir, pwd, rename,
>> rm, *
>> *> rmdir, symlink. And the ls command aren't supportted. Do anybody know
>> how to *
>> *> enumerate files and directory on a SFTP server? *
>> Just pass libcurl a URL to a directory (with a trailing slash) and it will
>>
>> give you a listing. You may also want the option CURLOPT_DIRLISTONLY.
>
>
> Yeah, it works. Thanks a lot!
>

If I want to enumerate only files with specified mask ( for example *.txt),
which URL I need to pass libcurl?
Besides, does libcurl support direct method to get file's SIZE in SFTP
server? I can see the size of a file only when I downloaded it or when I got
the list of files in SFTPServer, but there aren't the good method to get
files size :(
Thanks for any help!
Received on 2008-12-24