.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2017, 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
.\" *
.\" **************************************************************************
.\"
-.TH CURLOPT_FNMATCH_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"
+
.SH NAME
CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
.SH SYNOPSIS
.SH PROTOCOLS
FTP
.SH EXAMPLE
-TODO
+.nf
+static int my_fnmatch(void *clientp,
+ const char *pattern, const char *string)
+{
+ struct local_stuff *data = (struct local_stuff *)clientp;
+ if(string_match(pattern, string))
+ return CURL_FNMATCHFUNC_MATCH;
+ else
+ return CURL_FNMATCHFUNC_NOMATCH;
+}
+
+{
+ struct local_stuff local_data;
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/file*");
+ curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 1L);
+ curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, my_fnmatch);
+ curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, &local_data);
+}
+.fi
.SH AVAILABILITY
Added in 7.21.0
.SH RETURN VALUE