1CURLOPT_PREQUOTE(3)        curl_easy_setopt options        CURLOPT_PREQUOTE(3)
2
3
4

NAME

6       CURLOPT_PREQUOTE - commands to run before an FTP transfer
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,
12                                 struct curl_slist *cmds);
13

DESCRIPTION

15       Pass  a  pointer to a linked list of FTP commands to pass to the server
16       after the transfer type is set. The linked list should be a fully valid
17       list  of  struct curl_slist structs properly filled in as described for
18       CURLOPT_QUOTE(3). Disable this operation again by  setting  a  NULL  to
19       this option.
20
21       While  CURLOPT_QUOTE(3)  and  CURLOPT_POSTQUOTE(3)  work for SFTP, this
22       option does not.
23

DEFAULT

25       NULL
26

PROTOCOLS

28       FTP
29

EXAMPLE

31       struct curl_slist *h = NULL;
32       h = curl_slist_append(h, "SYST");
33
34       curl = curl_easy_init();
35       if(curl) {
36         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
37
38         /* pass in the FTP commands to run */
39         curl_easy_setopt(curl, CURLOPT_PREQUOTE, headerlist);
40
41         ret = curl_easy_perform(curl);
42
43         curl_easy_cleanup(curl);
44       }
45

AVAILABILITY

47       Along with the protocol support
48

RETURN VALUE

50       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
51       if not.
52

SEE ALSO

54       CURLOPT_QUOTE(3), CURLOPT_POSTQUOTE(3),
55
56
57
58libcurl 7.66.0                   June 18, 2017             CURLOPT_PREQUOTE(3)
Impressum