blob: 1718c16a123fca31ea72122575fcda9f0ffecaf1 [file] [log] [blame]
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -07001.\" **************************************************************************
2.\" * _ _ ____ _
3.\" * Project ___| | | | _ \| |
4.\" * / __| | | | |_) | |
5.\" * | (__| |_| | _ <| |___
6.\" * \___|\___/|_| \_\_____|
7.\" *
Elliott Hughes82be86d2017-09-20 17:00:17 -07008.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -07009.\" *
10.\" * This software is licensed as described in the file COPYING, which
11.\" * you should have received as part of this distribution. The terms
Alex Deymo8f1a2142016-06-28 14:49:26 -070012.\" * are also available at https://curl.haxx.se/docs/copyright.html.
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070013.\" *
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.
17.\" *
18.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19.\" * KIND, either express or implied.
20.\" *
21.\" **************************************************************************
22.\"
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070023.TH CURLOPT_PREQUOTE 3 "June 18, 2017" "libcurl 7.60.0" "curl_easy_setopt options"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070025.SH NAME
Elliott Hughes82be86d2017-09-20 17:00:17 -070026CURLOPT_PREQUOTE \- commands to run before an FTP transfer
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070027.SH SYNOPSIS
28#include <curl/curl.h>
29
Elliott Hughes82be86d2017-09-20 17:00:17 -070030CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,
31 struct curl_slist *cmds);
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070032.SH DESCRIPTION
Elliott Hughes82be86d2017-09-20 17:00:17 -070033Pass a pointer to a linked list of FTP commands to pass to the server after
34the transfer type is set. The linked list should be a fully valid list of
35struct curl_slist structs properly filled in as described for
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070036\fICURLOPT_QUOTE(3)\fP. Disable this operation again by setting a NULL to this
37option.
Elliott Hughes82be86d2017-09-20 17:00:17 -070038
39While \fICURLOPT_QUOTE(3)\fP and \fICURLOPT_POSTQUOTE(3)\fP work for SFTP,
40this option does not.
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070041.SH DEFAULT
42NULL
43.SH PROTOCOLS
Elliott Hughes82be86d2017-09-20 17:00:17 -070044FTP
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070045.SH EXAMPLE
Elliott Hughes82be86d2017-09-20 17:00:17 -070046.nf
47struct curl_slist *h = NULL;
48h = curl_slist_append(h, "SYST");
49
50curl = curl_easy_init();
51if(curl) {
52 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
53
54 /* pass in the FTP commands to run */
55 curl_easy_setopt(curl, CURLOPT_PREQUOTE, headerlist);
56
57 ret = curl_easy_perform(curl);
58
59 curl_easy_cleanup(curl);
60}
61.fi
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070062.SH AVAILABILITY
63Along with the protocol support
64.SH RETURN VALUE
65Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
66.SH "SEE ALSO"
67.BR CURLOPT_QUOTE "(3), " CURLOPT_POSTQUOTE "(3), "