cURL / Mailing Lists / curl-library / Single Mail


SFTP equivalents for FTP

From: Shehryar Khan <>
Date: Wed, 14 Feb 2007 14:36:32 -0800

The following API(s) work great when connected to a remote server
using FTP.

[example 1]

// figure out the initial directory that we connected to
CURLcode getInfoCurlCode = curl_easy_getinfo
if ((getInfoCurlCode == CURLE_OK) && ftpEntryPath)
     [self setInitialDirectoryPath:[NSString

[example 2]

// tell curl to create the remote directory
curl_easy_setopt(curlHandle, CURLOPT_FTP_CREATE_MISSING_DIRS,TRUE);

However neither of these work when connected via SFTP.

Anybody know if there are SFTP equivalents for these or if there is
another mechanism to get at this same information / functionality.


Received on 2007-02-14