CURLOPT_APPEND.3 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .\" generated by cd2nroff 0.1 from CURLOPT_APPEND.md
  2. .TH CURLOPT_APPEND 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_APPEND \- append to the remote file
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
  9. .fi
  10. .SH DESCRIPTION
  11. A long parameter set to 1 tells the library to append to the remote file
  12. instead of overwrite it. This is only useful when uploading to an FTP site.
  13. .SH DEFAULT
  14. 0 (disabled)
  15. .SH PROTOCOLS
  16. This functionality affects ftp only
  17. .SH EXAMPLE
  18. .nf
  19. int main(void)
  20. {
  21. CURL *curl = curl_easy_init();
  22. if(curl) {
  23. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile");
  24. curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
  25. curl_easy_setopt(curl, CURLOPT_APPEND, 1L);
  26. curl_easy_perform(curl);
  27. }
  28. }
  29. .fi
  30. .SH HISTORY
  31. This option was known as CURLOPT_FTPAPPEND up to 7.16.4
  32. .SH AVAILABILITY
  33. Added in curl 7.17.0
  34. .SH RETURN VALUE
  35. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  36. .SH SEE ALSO
  37. .BR CURLOPT_DIRLISTONLY (3),
  38. .BR CURLOPT_RESUME_FROM (3),
  39. .BR CURLOPT_UPLOAD (3)