cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: No subdirectories in ftp directory listings

From: Patrick Smith <patsmith_at_pobox.com>
Date: Tue, 07 May 2002 13:19:47 -0400

Daniel Stenberg wrote:
> On Mon, 6 May 2002, Patrick Smith wrote:
> [ NLST shows only files on wu-ftpd, while LIST shows everything. ]
>
> If the NLST behavior isn't good enough, you can always change the list
> command using the -X option. The problem of course occurs if you want to get
> a machine-readable directory listing back, as the LIST one is far from that
> (it isn't even the same on different server implementations).

I was doing this in a program, and wanted a machine-readable result.
:-( But I found a mirror site that doesn't use wu-ftpd. :-)

> Oh, and yes, the RFC959 description text for NLST seems to support what the
> wu-ftpd guys are saying.

Actually, it's not at all clear to me. NLST is supposed to "return a
stream of names of files and no other information". Given that LIST is
described as returning "a list of files in the specified directory",
it's not clear to me that the word "file" is meant to exclude links and
subdirectories. Note that mget is mentioned only as an example of how
NLST might be used.

I've attached a suggestion for wording in the man pages, trying to avoid
characterizing this behaviour as right or wrong.

-- 
patsmith_at_pobox.com

--- docs/curl.1.orig 2002-04-10 08:57:07.000000000 -0400
+++ docs/curl.1 2002-05-07 13:03:18.000000000 -0400
@@ -312,6 +312,10 @@
 directory since the normal directory view doesn't use a standard look
 or format.
 
+This option causes an FTP NLST command to be sent. Some FTP servers
+list only files in their response to NLST; they do not include
+subdirectories and symbolic links.
+
 If this option is used twice, the second will again disable list only.
 .IP "-L/--location"
 (HTTP/HTTPS) If the server reports that the requested page has a different

--- docs/libcurl/curl_easy_setopt.3.orig 2002-05-07 13:04:49.000000000 -0400
+++ docs/libcurl/curl_easy_setopt.3 2002-05-07 13:06:11.000000000 -0400
@@ -166,6 +166,10 @@
 A non-zero parameter tells the library to just list the names of an ftp
 directory, instead of doing a full directory listing that would include file
 sizes, dates etc.
+
+This causes an FTP NLST command to be sent. Beware that some FTP servers
+list only files in their response to NLST; they do not include
+subdirectories and symbolic links.
 .TP
 .B CURLOPT_FTPAPPEND
 A non-zero parameter tells the library to append to the remote file instead of

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-07