1CURLOPT_WILDCARDMATCH(3)   curl_easy_setopt options   CURLOPT_WILDCARDMATCH(3)
2
3
4

NAME

6       CURLOPT_WILDCARDMATCH - enable directory wildcard transfers
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_WILDCARDMATCH,  long
12       onoff);
13

DESCRIPTION

15       Set onoff to 1 if you want to transfer multiple files  according  to  a
16       file  name  pattern.  The  pattern can be specified as part of the CUR‐
17       LOPT_URL(3) option, using an fnmatch-like pattern (Shell Pattern Match‐
18       ing) in the last part of URL (file name).
19
20       By default, libcurl uses its internal wildcard matching implementation.
21       You can provide your own matching function by the CURLOPT_FNMATCH_FUNC‐
22       TION(3) option.
23
24       A brief introduction of its syntax follows:
25
26              * - ASTERISK
27                     ftp://example.com/some/path/*.txt (for all txt's from the
28                     root directory). Only two asterisks  are  allowed  within
29                     the same pattern string.
30
31              ? - QUESTION MARK
32                     Question mark matches any (exactly one) character.
33
34                     ftp://example.com/some/path/photo?.jpeg
35
36              [ - BRACKET EXPRESSION
37                     The left bracket opens a bracket expression. The question
38                     mark and asterisk have no special meaning  in  a  bracket
39                     expression.  Each  bracket  expression  ends by the right
40                     bracket and matches exactly one character. Some  examples
41                     follow:
42
43                     [a-zA-Z0-9] or [f-gF-G] - character interval
44
45                     [abc] - character enumeration
46
47                     [^abc] or [!abc] - negation
48
49                     [[:name:]]   class   expression.  Supported  classes  are
50                     alnum,lower, space, alpha, digit,  print,  upper,  blank,
51                     graph, xdigit.
52
53                     [][-!^]  - special case - matches only '-', ']', '[', '!'
54                     or '^'. These characters have no special purpose.
55
56                     [\[\]\\] - escape syntax. Matches '[', ']' or '\'.
57
58                     Using the rules above, a file name pattern  can  be  con‐
59                     structed:
60
61                     ftp://example.com/some/path/[a-z[:upper:]\\].jpeg
62

PROTOCOLS

64       This feature is only supported for FTP download.
65

EXAMPLE

67       See https://curl.haxx.se/libcurl/c/ftp-wildcard.html
68

AVAILABILITY

70       Added in 7.21.0
71

RETURN VALUE

73       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
74       if not.
75

SEE ALSO

77       CURLOPT_FNMATCH_FUNCTION(3), CURLOPT_URL(3),
78
79
80
81libcurl 7.64.0                   May 18, 2018         CURLOPT_WILDCARDMATCH(3)
Impressum