cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fw: Re[2]: ftp: curl-library

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 30 Aug 2005 20:06:03 +0200 (CEST)

On Tue, 30 Aug 2005, Eugene Kravchenko wrote:

> 1. Can I get a list of current path in memory?

libcurl has no notion of "current path". But yes, you can put the downloaded
data anywhere you like. In memory or in a file or whatever you think it should
do.

> 2. Is the curl-library supports ALL commands of ftp and sftp protocols?

libcurl is written for file transfers and it is best used for file transfers.
It is not a generic FTP protocol library. But I think you can use most FTP
commands with it.

SFTP is generally a name for a FTP look-alike protocol they use over SSH and
is not supported by libcurl. It might be in the future, but that is not
planned.

FTPS, or FTP-SSL, is supported by libcurl and is basically FTP with SSL
powers.

> 3. When I use curl_slist_append(), for example
>
> slist = curl_slist_append(slist, "CWD /my_test");
> slist = curl_slist_append(slist, "PWD");
> slist = curl_slist_append(slist, "PASV");
> slist = curl_slist_append(slist, "TYPE A");
>
> and then
>
> res = curl_easy_perform(curl);

Why would you do such a hack? libcurl works on URLs and it tries hard to do
these things on its own, so your additional commands will most likely confuse
or simply duplicate libcurl's efforts.

> After that curl-library begin perform all of this operations. Suppose
> something wrong with connection in that time. How can I know what commands
> from my slist already done and what's not?

By reading what header responses you got back or not, I guess.

> and how I can resume my slist commands from crashed command?

It wouldn't be "crashed" at all, it would've been disconnected.

And you should add the custom commands you want libcurl to send, so you need
to figure out what commands those are.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-08-30