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