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:42:39 +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/".
>

This will work well if the very/long/path/to/my/weird/dir/and/show/it/please/ is
in the HOME directory.
If this directory is under the root directory
very/long/path/to/my/weird/dir/and/show/it/please/, how can I retrieve its
contents?
Think of a {FTP_HOME}/tmp directory and the /tmp directory. How can retrive the
listing of the /tmp directory?
Your approach will retrieve the listing of the {FTP_HOME}/tmp directory.

Dimitris
Received on 2001-12-07