]> wimlib.net Git - wimlib/blob - include/wimlib/wildcard.h
5bae113d5c7178b3412513dcbe76b4fcfd0d6339
[wimlib] / include / wimlib / wildcard.h
1 #ifndef _WIMLIB_WILDCARD_H
2 #define _WIMLIB_WILDCARD_H
3
4 #include <wimlib/types.h>
5
6 struct wim_dentry;
7
8 #define WILDCARD_FLAG_WARN_IF_NO_MATCH          0x00000001
9 #define WILDCARD_FLAG_ERROR_IF_NO_MATCH         0x00000002
10 #define WILDCARD_FLAG_CASE_INSENSITIVE          0x00000004
11
12 extern int
13 expand_wildcard(WIMStruct *wim,
14                 const tchar *wildcard_path,
15                 int (*consume_dentry)(struct wim_dentry *, void *),
16                 void *consume_dentry_ctx,
17                 u32 flags);
18
19 #ifdef __WIN32__
20 extern int
21 fnmatch(const tchar *pattern, const tchar *string, int flags);
22 #  define FNM_CASEFOLD 0x1
23 #  define FNM_PATHNAME 0x2
24 #  define FNM_NOESCAPE 0x4
25 #  define FNM_NOMATCH 1
26 #else
27 #  include <fnmatch.h>
28 #  ifndef FNM_CASEFOLD
29 #    warning "FNM_CASEFOLD not defined!"
30 #    define FNM_CASEFOLD 0
31 #  endif
32 #endif
33
34 #endif /* _WIMLIB_WILDCARD_H  */