]> wimlib.net Git - wimlib/blob - include/wimlib/pattern.h
b0e299958fc7c48c0e951aff3bf91c6643e89a1c
[wimlib] / include / wimlib / pattern.h
1 #ifndef _WIMLIB_PATTERN_H
2 #define _WIMLIB_PATTERN_H
3
4 #include "wimlib/types.h"
5
6 struct wim_dentry;
7
8 /* Flags for match_path() and match_pattern_list() */
9
10 /*
11  * If set, subdirectories (and sub-files) are also matched.
12  * For example, the pattern "/dir" would match the path "/dir/file".
13  */
14 #define MATCH_RECURSIVELY       0x01
15
16 /*
17  * If set, ancestor directories are also matched.
18  * For example, the pattern "/dir/file" would match the path "/dir".
19  */
20 #define MATCH_ANCESTORS         0x02
21
22 extern bool
23 match_path(const tchar *path, const tchar *pattern, int match_flags);
24
25 extern int
26 expand_path_pattern(struct wim_dentry *root, const tchar *pattern,
27                     int (*consume_dentry)(struct wim_dentry *, void *),
28                     void *ctx);
29
30 #endif /* _WIMLIB_PATTERN_H  */