xref: /aosp_15_r20/external/curl/docs/cmdline-opts/ftp-method.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: ftp-method
5*6236dae4SAndroid Build Coastguard WorkerArg: <method>
6*6236dae4SAndroid Build Coastguard WorkerHelp: Control CWD usage
7*6236dae4SAndroid Build Coastguard WorkerProtocols: FTP
8*6236dae4SAndroid Build Coastguard WorkerAdded: 7.15.1
9*6236dae4SAndroid Build Coastguard WorkerCategory: ftp
10*6236dae4SAndroid Build Coastguard WorkerMulti: single
11*6236dae4SAndroid Build Coastguard WorkerSee-also:
12*6236dae4SAndroid Build Coastguard Worker  - list-only
13*6236dae4SAndroid Build Coastguard WorkerExample:
14*6236dae4SAndroid Build Coastguard Worker  - --ftp-method multicwd ftp://example.com/dir1/dir2/file
15*6236dae4SAndroid Build Coastguard Worker  - --ftp-method nocwd ftp://example.com/dir1/dir2/file
16*6236dae4SAndroid Build Coastguard Worker  - --ftp-method singlecwd ftp://example.com/dir1/dir2/file
17*6236dae4SAndroid Build Coastguard Worker---
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Worker# `--ftp-method`
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard WorkerControl what method curl should use to reach a file on an FTP(S)
22*6236dae4SAndroid Build Coastguard Workerserver. The method argument should be one of the following alternatives:
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard Worker## multicwd
25*6236dae4SAndroid Build Coastguard WorkerDo a single CWD operation for each path part in the given URL. For deep
26*6236dae4SAndroid Build Coastguard Workerhierarchies this means many commands. This is how RFC 1738 says it should be
27*6236dae4SAndroid Build Coastguard Workerdone. This is the default but the slowest behavior.
28*6236dae4SAndroid Build Coastguard Worker
29*6236dae4SAndroid Build Coastguard Worker## nocwd
30*6236dae4SAndroid Build Coastguard WorkerDo no CWD at all. curl does SIZE, RETR, STOR etc and gives the full path to
31*6236dae4SAndroid Build Coastguard Workerthe server for each of these commands. This is the fastest behavior.
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker## singlecwd
34*6236dae4SAndroid Build Coastguard WorkerDo one CWD with the full target directory and then operate on the file
35*6236dae4SAndroid Build Coastguard Worker"normally" (like in the multicwd case). This is somewhat more standards
36*6236dae4SAndroid Build Coastguard Workercompliant than `nocwd` but without the full penalty of `multicwd`.
37