curl-users
Re: anything for the upcoming release?
Date: Fri, 1 Dec 2000 08:30:23 +0100 (MET)
On Fri, 1 Dec 2000, Andres Garcia wrote:
> With curl -l ftp://ftp.site.org/pub you get a list of the files in that
> directory, it would be nice to be able to get just the list of the
> subdirectories
Actually, curl -l ftp://blabla lists both directories and files. But I think
your request is nevertheless interesting.
The -l option tells libcurl to use a different FTP command to browse the
directory (NLST instead of LIST). To tell which files that are directories,
we'd have to add a parser for the LIST output (which is not defined anywhere
but is entirely up to the server) or perhaps add an engine that attempts to
change directory (CWD and if success, a following CDUP) to all mentioned file
entries in order to detect which are directories (this would then probably
not detect directories where the user has insufficient properties).
Parsing the LIST output is tricky business, but could probably be based on D.
J. Bernstein's ftpparse stuff at http://cr.yp.to/ftpparse.html
This is another set of things we need to discuss and think through. It won't
get into 7.5. Given enough support and feedback, we might get it into the
release after that...
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/Received on 2000-12-01