cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to preserve remote file datestamp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Feb 2006 14:29:43 +0100 (CET)

On Tue, 21 Feb 2006, Tony Metters wrote:

>> curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
>
> 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'.

Well, that is not libcurl's responsibility and it is more a problem you need
to work out with your operating system. On most systems you can use utime() to
achieve what you want.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-02-21