diff options
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 index 628b4297d..67931354b 100644 --- a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 +++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -78,7 +78,21 @@ Using the rules above, a file name pattern can be constructed: .SH PROTOCOLS This feature is only supported for FTP download. .SH EXAMPLE -See https://curl.se/libcurl/c/ftp-wildcard.html +.nf + /* initialization of easy handle */ + handle = curl_easy_init(); + + /* turn on wildcard matching */ + curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L); + + /* callback is called before download of concrete file started */ + curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming); + + /* callback is called after data from the file have been transferred */ + curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded); + + /* See more on https://curl.se/libcurl/c/ftp-wildcard.html */ +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE |