CURLOPT_APPEND(3)

πŸ’… CURLOPT_APPEND(3) πŸ’…

okay so this is a page from the Library Functions Manual, bestie β€” yes, the libcurl one, we're in the big leagues now πŸŽ€

✨ NAME ✨

CURLOPT_APPEND β€” literally the "append to the remote file instead of clobbering it" option 🫢

✨ SYNOPSIS ✨

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);

✨ DESCRIPTION ✨

so you pass in a long parameter, and if you set it to 1, you're telling the library to append to the remote file instead of overwriting it. no cap, that's the whole vibe πŸ’–

quick reality check though: this is only useful when you're uploading to an FTP site β€” it's giving very niche, very specific, iykyk 🌸

✨ DEFAULT ✨

0 (disabled) β€” she's off by default, as she should be πŸ™ˆ

✨ PROTOCOLS ✨

this functionality affects ftp and sftp β€” periodt πŸ’…

✨ EXAMPLE ✨

like, here's the whole thing, copy it, live your life:

int main(void)
{
  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);
  }
}

✨ HISTORY ✨

okay history lesson πŸ•°οΈ β€” this option used to be known as CURLOPT_FTPAPPEND up to 7.16.4. she got a glow-up and a rebrand, iconic behavior honestly πŸ‘‘

✨ AVAILABILITY ✨

added in curl 7.17.0 β€” so if your curl is ancient, that's a you problem bestie 😭

✨ RETURN VALUE ✨

curl_easy_setopt(3) returns a CURLcode indicating success or error, fr fr.

  • CURLE_OK (0) means everything was OK πŸŽ‰
  • non-zero means an error occurred β€” go check libcurl-errors(3) πŸ’€

✨ SEE ALSO ✨


that's the whole page bestie, go append something πŸ¦‹

written by libcurl, dated 2026-10-12, and yeah β€” the title at the top and bottom both say CURLOPT_APPEND(3), we're consistent like that β­πŸ’œ

πŸ“¦ where this page comes from