curl-w32/docs/cmdline-opts/ftp-method.md

1.2 KiB

c SPDX-License-Identifier Long Arg Help Protocols Added Category Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl ftp-method <method> Control CWD usage FTP 7.15.1 ftp single
list-only
--ftp-method multicwd ftp://example.com/dir1/dir2/file
--ftp-method nocwd ftp://example.com/dir1/dir2/file
--ftp-method singlecwd ftp://example.com/dir1/dir2/file

--ftp-method

Control what method curl should use to reach a file on an FTP(S) server. The method argument should be one of the following alternatives:

multicwd

curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how RFC 1738 says it should be done. This is the default but the slowest behavior.

nocwd

curl does no CWD at all. curl does SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.

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'.