cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 10 Dec 2008 19:17:58 -0800

On Thu, Dec 11, 2008 at 10:07:03AM +0700, Ngo Hoa Lan Phuong wrote:
> 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.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-11