cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: the count of files

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 5 May 2014 09:38:36 +0200

On Mon, May 05, 2014 at 08:47:45AM +0200, Daniel Stenberg wrote:
> On Mon, May 5, 2014 at 4:11 AM, ΑυΣ’Ξ° <506017026_at_qq.com> wrote:
>
> I list dir with libcurl on ftp.
> I want to get count of files in the dir
> Is there a param of function to record the count of files in dir?
>
>
> Hello!
>
> No sorry, there's no other way to do that than to ask for a directory listing
> and count the entries yourself - which indeed can be challenging...

If you use the NLST command instead of LIST to get the directory listing, the
results are generally less useful, but should be much more regular and easier
to parse and count.

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