xref: /aosp_15_r20/external/curl/docs/cmdline-opts/create-dirs.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: create-dirs
5*6236dae4SAndroid Build Coastguard WorkerHelp: Create necessary local directory hierarchy
6*6236dae4SAndroid Build Coastguard WorkerCategory: output
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.10.3
8*6236dae4SAndroid Build Coastguard WorkerMulti: boolean
9*6236dae4SAndroid Build Coastguard WorkerSee-also:
10*6236dae4SAndroid Build Coastguard Worker  - ftp-create-dirs
11*6236dae4SAndroid Build Coastguard Worker  - output-dir
12*6236dae4SAndroid Build Coastguard WorkerExample:
13*6236dae4SAndroid Build Coastguard Worker  - --create-dirs --output local/dir/file $URL
14*6236dae4SAndroid Build Coastguard Worker---
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard Worker# `--create-dirs`
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard WorkerWhen used in conjunction with the --output option, curl creates the necessary
19*6236dae4SAndroid Build Coastguard Workerlocal directory hierarchy as needed. This option creates the directories
20*6236dae4SAndroid Build Coastguard Workermentioned with the --output option combined with the path possibly set with
21*6236dae4SAndroid Build Coastguard Worker--output-dir. If the combined output filename uses no directory, or if the
22*6236dae4SAndroid Build Coastguard Workerdirectories it mentions already exist, no directories are created.
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard WorkerCreated directories are made with mode 0750 on Unix-style file systems.
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard WorkerTo create remote directories when using FTP or SFTP, try --ftp-create-dirs.
27