cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_FILETIME works for SFTP?

From: <keqiong.xin_at_cummins.com>
Date: Thu, 26 Apr 2012 13:58:00 -0400

I was trying to use below code to retrieve the last modification time for
file.

                curl_easy_setopt(_curlHandle, CURLOPT_URL, url);

                curl_easy_setopt(_curlHandle, CURLOPT_FILETIME, 1);

                curl_easy_setopt(_curlHandle, CURLOPT_TIMECONDITION,
CURL_TIMECOND_IFMODSINCE);

                CURLcode result = curl_easy_perform(_curlHandle);

                curl_easy_getinfo(_curlHandle, CURLINFO_FILETIME,
&fileTime); //returning -1 for SFTP

For HTTP server, I did get the file time. However, for SFTP, it didn't
return anything. I debug through the code, and seems that ssh.c file never
calls the Curl_gmtime() func to get file time. So I assume this
CURLOPT_FILETIME doesn't work for SFTP? Please correct me if I was wrong.

Thanks and regards,

KQ

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-26