quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_APPEND.md (1213B)


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