cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to preserve remote file datestamp

From: Tony Metters <tony_metters_at_hotmail.com>
Date: Tue, 21 Feb 2006 12:18:46 +0000

>
>On Tue, 21 Feb 2006, Tony Metters wrote:
>
>>How can I use the libcurl API and preserve the remote file datestamp, I
>>know there is a -R option in the curl interface. How do I do this from
>>within libcurl
>
>First:
>
> curl_easy_setopt(curl, CURLOPT_FILETIME, TRUE);
>
>Then after the transfer was successful:
>
> curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
>

thanks for the swift reply but .....

I understand that this will get me the datestamp for the file on the server,
but what I am unsure of is how to make my writecallback (which uses
'fwrite() to dump the file to the client disk) change the timestamp of the
file to that of 'filetime'.

I take it that all file transfers must use a writecallback to 'write' the
file to disk. Is there a command (on Windows) to alter the datestamp of a
'freshly' written file???

I know I am labouring the point here but at the moment I just don;t get it?

tony
Received on 2006-02-21