GNURLOPT_PREQUOTE(3)
hey bestie! welcome to GNURLOPT_PREQUOTE(3), straight from the curl_easy_setopt options manual π
β¨
π NAME π
CURLOPT_PREQUOTE β commands to run before an FTP transfer, periodt π
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,
struct curl_slist *cmds);
β¨ DESCRIPTION β¨
okay so you pass a pointer to a linked list of FTP commands, and those get passed to the server after the transfer type is set π«Ά
The linked list should be a fully valid list of struct curl_slist structs, properly filled in as described for CURLOPT_QUOTE(3). Like, donβt hand it a cursed list, bestie π
You can disable this operation again by setting a NULL to this option. yep, NULL = off πΈ
π¨ SFTP check:CURLOPT_QUOTE(3)andCURLOPT_POSTQUOTE(3)work for SFTP, but this option does not. The way that distinction matters, fr fr π
π DEFAULT π
NULL β thatβs the default, no cap β¨
π PROTOCOLS π
FTP π
π§ EXAMPLE π§
struct curl_slist *cmdlist = NULL;
cmdlist = curl_slist_append(cmdlist, "SYST");
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
/* pass in the FTP commands to run */
curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π« AVAILABILITY π«
Itβs available along with the protocol support β iykyk π¦
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. iconic behavior π
π SEE ALSO π
CURLOPT_QUOTE(3),CURLOPT_POSTQUOTE(3), β go read those too, bestie π«Ά
okay thatβs the page, bestie β source/version + date: libcurl 7.37.0, 17 Jun 2014. byeee πβ¨π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms