file: add support for getting basic directory listings

Not supported on Windows (yet)

Closes #13137
This commit is contained in:
Colin Leroy-Mira 2024-03-16 12:39:01 +01:00 committed by Daniel Stenberg
parent e14daeb8a4
commit bfe54b0e88
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 148 additions and 38 deletions

View file

@ -3,10 +3,10 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: list-only
Short: l
Protocols: FTP POP3 SFTP
Protocols: FTP POP3 SFTP FILE
Help: List only mode
Added: 4.0
Category: ftp pop3 sftp
Category: ftp pop3 sftp file
Multi: boolean
See-also:
- quote
@ -35,6 +35,9 @@ When retrieving a specific email from POP3, this switch forces a LIST command
to be performed instead of RETR. This is particularly useful if the user wants
to see if a specific message-id exists on the server and what size it is.
For FILE, this option has no effect yet as directories are always listed in
this mode.
Note: When combined with --request, this option can be used to send a UIDL
command instead, so the user may use the email's unique identifier rather than
its message-id to make the request.

View file

@ -36,6 +36,9 @@ messages on the POP3 server. This can be used to change the default behavior
of libcurl, when combined with a URL that contains a message ID, to perform a
"scan listing" which can then be used to determine the size of an email.
For FILE, this option has no effect yet as directories are always listed in
this mode.
Note: For FTP this causes a NLST command to be sent to the FTP server. Beware
that some FTP servers list only files in their response to NLST; they might
not include subdirectories and symbolic links.