GNURLOPT_APPEND(3)
π NAME π
Okay bestie, welcome to the GNURLOPT_APPEND(3) page β it's one of the curl_easy_setopt options manual pages, and today's main character is CURLOPT_APPEND: enable appending to the remote file. Not me being obsessed with FTP uploads, but here we are π
.
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
π¦ DESCRIPTION π¦
Lowkey simple: you pass a long parameter set to 1, and that tells the library to append to the remote file instead of overwrite it. The way that this is only useful when uploading to an FTP site? Fr fr, that's the whole vibe.
π DEFAULT π
0 (disabled) β so by default the append behavior is not on, no cap.
π PROTOCOLS π
The one and only protocol here is FTP.
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile");
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl, CURLOPT_APPEND, 1L);
curl_easy_perform(curl);
}
π AVAILABILITY π
This option was known as CURLOPT_FTPAPPEND up to 7.16.4 β so if you're time-traveling through curl history, iykyk.
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Periodt.
π₯ SEE ALSO π₯
Signed off with the very cute combo of libcurl 7.37.0 and the date 17 Jun 2014 β this GNURLOPT_APPEND(3) page ate and left no crumbs π«Άβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2016, 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