1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
25 CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
28 #include <curl/curl.h>
31 CURLFTP_CREATE_DIR_NONE,
33 CURLFTP_CREATE_DIR_RETRY
36 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_CREATE_MISSING_DIRS,
39 Pass a long telling libcurl to \fIcreate\fP the dir. If the value is
40 \fICURLFTP_CREATE_DIR\fP (1), libcurl will attempt to create any remote
41 directory that it fails to "move" into.
43 For FTP requests, that means a CWD command fails. CWD being the command that
44 changes working directory.
46 For SFTP requests, libcurl will attempt to create the remote directory if it
47 can't obtain a handle to the target-location. The creation will fail if a file
48 of the same name as the directory to create already exists or lack of
49 permissions prevents creation.
51 Setting \fIcreate\fP to \fICURLFTP_CREATE_DIR_RETRY\fP (2), tells libcurl to
52 retry the CWD command again if the subsequent MKD command fails. This is
53 especially useful if you're doing many simultaneous connections against the
54 same server and they all have this option enabled, as then CWD may first fail
55 but then another connection does MKD before this connection and thus MKD fails
58 CURLFTP_CREATE_DIR_NONE (0)
64 Added in 7.10.7. SFTP support added in 7.16.3. The retry option was added in
67 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the
70 .BR CURLOPT_FTP_FILEMETHOD "(3), " CURLOPT_FTP_USE_EPSV "(3), "