1CURLOPT_RESUME_FROM_LARGE(3)curl_easy_setopt optionsCURLOPT_RESUME_FROM_LARGE(3)
2
3
4

NAME

6       CURLOPT_RESUME_FROM_LARGE - set a point to resume transfer from
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM_LARGE,
12                                 curl_off_t from);
13

DESCRIPTION

15       Pass  a  curl_off_t  as  parameter. It contains the offset in number of
16       bytes that you want the transfer to start from. Set this option to 0 to
17       make  the  transfer  start  from  the  beginning (effectively disabling
18       resume). For FTP, set this option to -1 to make the transfer start from
19       the end of the target file (useful to continue an interrupted upload).
20
21       When  doing  uploads  with  FTP,  the  resume  position is where in the
22       local/source file libcurl should try to resume the upload from  and  it
23       will then append the source file to the remote target file.
24

DEFAULT

26       0, not used
27

PROTOCOLS

29       HTTP, FTP, SFTP, FILE
30

EXAMPLE

32       CURL *curl = curl_easy_init();
33       if(curl) {
34         curl_off_t resume_position = GET_IT_SOMEHOW;
35         curl_off_t file_size = GET_IT_SOMEHOW_AS_WELL;
36
37         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
38
39         /* resuming upload at this position, possibly beyond 2GB */
40         curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, resume_position);
41
42         /* ask for upload */
43         curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
44
45         /* set total data amount to expect */
46         curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_size);
47
48         /* Perform the request */
49         curl_easy_perform(curl);
50       }
51

AVAILABILITY

53       Added in 7.11.0
54

RETURN VALUE

56       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
57       if not.
58

SEE ALSO

60       CURLOPT_RESUME_FROM(3), CURLOPT_RANGE(3), CURLOPT_INFILESIZE_LARGE(3),
61
62
63
64libcurl 7.61.1                 February 03, 2016  CURLOPT_RESUME_FROM_LARGE(3)
Impressum