blob: d745cca32b2c30ec58012f7256d5dc5d38b10e73 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: ftp-method
4Arg: <method>
5Help: Control CWD usage
6Protocols: FTP
7Added: 7.15.1
8Category: ftp
9Example: --ftp-method multicwd ftp://example.com/dir1/dir2/file
10Example: --ftp-method nocwd ftp://example.com/dir1/dir2/file
11Example: --ftp-method singlecwd ftp://example.com/dir1/dir2/file
12See-also: list-only
13Multi: single
14---
15Control what method curl should use to reach a file on an FTP(S)
16server. The method argument should be one of the following alternatives:
17.RS
18.IP multicwd
19curl does a single CWD operation for each path part in the given URL. For deep
20hierarchies this means many commands. This is how RFC 1738 says it should
21be done. This is the default but the slowest behavior.
22.IP nocwd
23curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
24path to the server for all these commands. This is the fastest behavior.
25.IP singlecwd
26curl does one CWD with the full target directory and then operates on the file
27"normally" (like in the multicwd case). This is somewhat more standards
28compliant than 'nocwd' but without the full penalty of 'multicwd'.
29.RE