mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
--ftp-method and CURLOPT_FTP_FILEMETHOD are now documented and usable
This commit is contained in:
parent
d494d62953
commit
bac52f3969
16
docs/curl.1
16
docs/curl.1
@ -372,6 +372,22 @@ the server, the standard behavior of curl is to fail. Using this option, curl
|
||||
will instead attempt to create missing directories.
|
||||
|
||||
If this option is used twice, the second will again disable directory creation.
|
||||
.IP "--ftp-method [method]"
|
||||
(FTP) Control what method curl should use to reach a file on a FTP(S)
|
||||
server. The method argument should be one of the following alternatives:
|
||||
.RS
|
||||
.IP multicwd
|
||||
curl does a single CWD operation for each path part in the given URL. For deep
|
||||
hierarchies this means very many commands. This is how RFC1738 says it should
|
||||
be done. This is the default but the slowest behavior.
|
||||
.IP nocwd
|
||||
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
|
||||
path to the server for all these commands. This is the fastest behavior.
|
||||
.IP singlecwd
|
||||
curl does one CWD with the full target directory and then operates on the file
|
||||
\&"normally" (like in the multicwd case). This is somewhat more standards
|
||||
compliant than 'nocwd' but without the full penalty of 'multicwd'.
|
||||
.RE
|
||||
.IP "--ftp-pasv"
|
||||
(FTP) Use PASV when transferring. PASV is the internal default behavior, but
|
||||
using this option can be used to override a previous --ftp-port option. (Added
|
||||
|
@ -858,6 +858,23 @@ Exactly like \fICURLOPT_POSTQUOTE\fP, but for the source host.
|
||||
Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP
|
||||
server asks for "account data" after user name and password has been provided,
|
||||
this data is sent off using the ACCT command. (Added in 7.13.0)
|
||||
.IP CURLOPT_FTP_FILEMETHOD
|
||||
Pass a long that should have one of the following values. This option controls
|
||||
what method libcurl should use to reach a file on a FTP(S) server. The
|
||||
argument should be one of the following alternatives:
|
||||
.RS
|
||||
.IP CURLFTPMETHOD_MULTICWD
|
||||
libcurl does a single CWD operation for each path part in the given URL. For
|
||||
deep hierarchies this means very many commands. This is how RFC1738 says it
|
||||
should be done. This is the default but the slowest behavior.
|
||||
.IP CURLFTPMETHOD_NOCWD
|
||||
libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
|
||||
full path to the server for all these commands. This is the fastest behavior.
|
||||
.IP CURLFTPMETHOD_SINGLECWD
|
||||
libcurl does one CWD with the full target directory and then operates on the
|
||||
file \&"normally" (like in the multicwd case). This is somewhat more standards
|
||||
compliant than 'nocwd' but without the full penalty of 'multicwd'.
|
||||
.RE
|
||||
.SH PROTOCOL OPTIONS
|
||||
.IP CURLOPT_TRANSFERTEXT
|
||||
A non-zero parameter tells the library to use ASCII mode for ftp transfers,
|
||||
|
@ -381,6 +381,15 @@ typedef enum {
|
||||
CURLFTPAUTH_LAST /* not an option, never use */
|
||||
} curl_ftpauth;
|
||||
|
||||
/* parameter for the CURLOPT_FTP_FILEMETHOD option */
|
||||
typedef enum {
|
||||
CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
|
||||
CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */
|
||||
CURLFTPMETHOD_NOCWD, /* no CWD at all */
|
||||
CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
|
||||
CURLFTPMETHOD_LAST /* not an option, never use */
|
||||
} curl_ftpmethod;
|
||||
|
||||
/* long may be 32 or 64 bits, but we should never depend on anything else
|
||||
but 32 */
|
||||
#define CURLOPTTYPE_LONG 0
|
||||
@ -912,7 +921,8 @@ typedef enum {
|
||||
control connection. */
|
||||
CINIT(FTP_SKIP_PASV_IP, LONG, 137),
|
||||
|
||||
/* Select "file method" to use when doing FTP */
|
||||
/* Select "file method" to use when doing FTP, see the curl_ftpmethod
|
||||
above. */
|
||||
CINIT(FTP_FILEMETHOD, LONG, 138),
|
||||
|
||||
/* Local port number to bind the socket to */
|
||||
|
Loading…
Reference in New Issue
Block a user