1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_APPEND 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_DIRLISTONLY (3) 9 - CURLOPT_RESUME_FROM (3) 10 - CURLOPT_UPLOAD (3) 11Protocol: 12 - FTP 13--- 14 15# NAME 16 17CURLOPT_APPEND - append to the remote file 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append); 25~~~ 26 27# DESCRIPTION 28 29A long parameter set to 1 tells the library to append to the remote file 30instead of overwrite it. This is only useful when uploading to an FTP site. 31 32# DEFAULT 33 340 (disabled) 35 36# EXAMPLE 37 38~~~c 39int main(void) 40{ 41 CURL *curl = curl_easy_init(); 42 if(curl) { 43 44 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile"); 45 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); 46 curl_easy_setopt(curl, CURLOPT_APPEND, 1L); 47 48 curl_easy_perform(curl); 49 } 50} 51~~~ 52 53# AVAILABILITY 54 55This option was known as CURLOPT_FTPAPPEND up to 7.16.4 56 57# RETURN VALUE 58 59Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 60