]> wimlib.net Git - wimlib/blobdiff - include/wimlib/wildcard.h
win32_capture.c: adjust loading stream info from encrypted files
[wimlib] / include / wimlib / wildcard.h
index 4506ac3fcf819fee6f37f6bd14279913fb21718a..4cf21eef2040bd4213c3a7728110c831723bc057 100644 (file)
@@ -1,34 +1,23 @@
 #ifndef _WIMLIB_WILDCARD_H
 #define _WIMLIB_WILDCARD_H
 
-#include <wimlib/types.h>
+#include "wimlib/types.h"
 
-#define WILDCARD_FLAG_USE_LITERAL_IF_NO_MATCHES        0x00000001
-#define WILDCARD_FLAG_WARN_IF_NO_MATCH         0x00000002
-#define WILDCARD_FLAG_ERROR_IF_NO_MATCH                0x00000004
-#define WILDCARD_FLAG_CASE_INSENSITIVE         0x00000008
+struct wim_dentry;
 
-extern int
-expand_wildcard_wim_paths(WIMStruct *wim,
-                         const tchar * const *wildcards,
-                         size_t num_wildcards,
-                         tchar ***expanded_paths_ret,
-                         size_t *num_expanded_paths_ret,
-                         u32 flags);
+#define WILDCARD_FLAG_WARN_IF_NO_MATCH         0x00000001
+#define WILDCARD_FLAG_ERROR_IF_NO_MATCH                0x00000002
+#define WILDCARD_FLAG_CASE_INSENSITIVE         0x00000004
 
-#ifdef __WIN32__
 extern int
-fnmatch(const tchar *pattern, const tchar *string, int flags);
-#  define FNM_CASEFOLD 0x1
-#  define FNM_PATHNAME 0x2
-#  define FNM_NOESCAPE 0x4
-#  define FNM_NOMATCH 1
-#else
-#  include <fnmatch.h>
-#  ifndef FNM_CASEFOLD
-#    warning "FNM_CASEFOLD not defined!"
-#    define FNM_CASEFOLD 0
-#  endif
-#endif
+expand_wildcard(WIMStruct *wim,
+               const tchar *wildcard_path,
+               int (*consume_dentry)(struct wim_dentry *, void *),
+               void *consume_dentry_ctx,
+               u32 flags);
+
+extern bool
+match_path(const tchar *path, size_t path_nchars,
+          const tchar *wildcard, tchar path_sep, bool prefix_ok);
 
 #endif /* _WIMLIB_WILDCARD_H  */