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       These commands are not performed when a directory listing is performed,
22       only for file transfers.
23
24       While CURLOPT_QUOTE(3) and CURLOPT_POSTQUOTE(3) work for SFTP, this op‐
25       tion does not.
26

DEFAULT

28       NULL
29

PROTOCOLS

31       FTP
32

EXAMPLE

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

AVAILABILITY

50       Along with the protocol support
51

RETURN VALUE

53       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
54       if not.
55

SEE ALSO

57       CURLOPT_QUOTE(3), CURLOPT_POSTQUOTE(3),
58
59
60
61libcurl 8.0.1                  January 02, 2023            CURLOPT_PREQUOTE(3)
Impressum