cURL / Mailing Lists / curl-library / Single Mail


Re: How to capture the STAT output in a variable ?

From: Dan Fandrich <>
Date: Tue, 16 Dec 2008 22:22:45 -0800

On Wed, Dec 17, 2008 at 05:10:01PM +1100, Sundar, Karthik wrote:
> I CWD to a directory and use STAT *.* command to get the list of all the files
> in the directory printed in the stdout .But is there any way I can store this
> result in a variable.

You should be able to get it through a header callback function. But why
do it this way? Why not just let libcurl itself give you a directory
listing? Just add a slash to the end of the URL or use CURLOPT_DIRLISTONLY.
It's not a good idea to use CWD in a quote command, anyway, because it puts
libcurl out of sync with the server w.r.t. CWD.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-17