cURL / Mailing Lists / curl-users / Single Mail

curl-users

Directory exists?curl with sftp

From: san d <sandks14_at_gmail.com>
Date: Mon, 3 Mar 2014 19:41:45 +0530

I am trying to find out whether a particular directory exists on my SFTP
destination. However, for a non-existent directory the following snippet of
code returning CURLE_OK.

Could someone help me out in achieving my requirement?

  curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 1L);
  curl_easy_setopt(curl, CURLOPT_URL, sftptargetURL);
  curl_easy_setopt(curl, CURLOPT_NOBODY, 1);

  CURLcode errorCode = curl_easy_perform(curl);

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-03