cURL / Mailing Lists / curl-library / Single Mail

curl-library

Where do I get the response from the SIZE command?

From: Guido Reina <guidoreina_at_isdn-si.com>
Date: Thu, 17 Oct 2002 13:35:46 +0200

Hi there,

To ask the FTP server about the file size of a file, would it be something like this? (imagine the file is at: ftp://127.0.0.1/dir/my_file)
#define REMOTE_URL "ftp://127.0.0.1/dir/"

...
char buf_1 [] = "SIZE my_file";
...
...
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, my_curl_write_function);

headerlist = curl_slist_append (headerlist, buf_1);
res = curl_easy_perform(curl);

The write function is called just once, and 'void *ptr' contains the listing of the directory 'dir'. How do I get the response from the SIZE command?

Thanks in advance,

Guido.

-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
Received on 2002-10-17