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 11:25:42 +0100 (CET)

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);

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