cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Why curl does CWD (was Re: Problem with subsequent persistantcalls)

From: Dimitris Sarris <dsar_at_intracom.gr>
Date: Fri, 07 Dec 2001 16:51:21 +0200

Daniel Stenberg wrote:

> On Fri, 7 Dec 2001, Dimitris Sarris wrote:
>
> > I got it wrong. My goal is to perform a CWD command and then retrieve the
> > listing of the directory. That's why, I performed a CWD command with the
> > CURLOPT_QUOTE and then performed the connection. With your explanation,
> > my implementation is not valid.
>
> Ok.
>
> > How can I perform the directory listing of a directory except for the
> > HOME?
>
> This is already perfectly well supported by libcurl! Just use a URL with a
> different directory than /. Try
> "ftp://localhost/very/long/path/to/my/weird/dir/and/show/it/please/".
>
> > Why did you implement it like this?
>
> Can you explain a better way to do it?
>
> > I suppose that it should be more suitable to first perform the CWD to
> > home, then the quoted commands and last the transfer.
>
> I don't think so. Because then if you do a CWD in the quoted commands, the
> transfer is destined to fail. Now, you can CWD and do whatever you want, and
> then curl will just jump to the correct directory and do the transfer.
>

Ignore my last mail. I must provide a second '/' after the server address.

Thanks again,
Dimitris
Received on 2001-12-07