cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP equivalents for FTP

From: James Housley <jim_at_thehousleys.net>
Date: Wed, 14 Feb 2007 18:29:08 -0500

On Feb 14, 2007, at 5:36 PM, Shehryar Khan wrote:

>
> 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
> (curlHandle,CURLINFO_FTP_ENTRY_PATH,&ftpEntryPath);
> if ((getInfoCurlCode == CURLE_OK) && ftpEntryPath)
> {
> [self setInitialDirectoryPath:[NSString
> stringWithCString:ftpEntryPath]];
> }
>
> [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.

Not yet. The SFTP support is very basic. Currently Daniel is doing
a lot of work on the libssh2 library that SFTP uses. After that, the
SFTP support in curl will be expanded.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
In theory there is no difference between theory and practice.
In practice there is no similarity.
       -- From the "I wish I'd said that" archives.
Received on 2007-02-15