]> wimlib.net Git - wimlib/blob - include/wimlib/case.h
Limit exposure of dentry and inode creation
[wimlib] / include / wimlib / case.h
1 #ifndef _WIMLIB_CASE_H
2 #define _WIMLIB_CASE_H
3
4 #include <stdbool.h>
5
6 /* Note: the NTFS-3g headers define CASE_SENSITIVE, hence the WIMLIB prefix.  */
7 typedef enum {
8         /* Use either case-sensitive or case-insensitive search, depending on
9          * the variable @default_ignore_case.  */
10         WIMLIB_CASE_PLATFORM_DEFAULT = 0,
11
12         /* Use case-sensitive search.  */
13         WIMLIB_CASE_SENSITIVE = 1,
14
15         /* Use case-insensitive search.  */
16         WIMLIB_CASE_INSENSITIVE = 2,
17 } CASE_SENSITIVITY_TYPE;
18
19 extern bool default_ignore_case;
20
21 static inline bool
22 will_ignore_case(CASE_SENSITIVITY_TYPE case_type)
23 {
24         if (case_type == WIMLIB_CASE_SENSITIVE)
25                 return false;
26         if (case_type == WIMLIB_CASE_INSENSITIVE)
27                 return true;
28
29         return default_ignore_case;
30 }
31
32 #endif /* _WIMLIB_CASE_H  */