ReXGlue SDK
Loading...
Searching...
No Matches
file_open.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <rex/bit.h>
14#include <rex/types.h>
15
16namespace rex::filesystem {
17
18using rex::HasFlags;
19using rex::operator|;
20using rex::operator&;
21using rex::operator^;
22using rex::operator~;
23using rex::operator|=;
24using rex::operator&=;
25using rex::operator^=;
26
28enum class Access : u32 {
29 kNone = 0,
30 kReadData = 0x00000001,
31 kWriteData = 0x00000002,
32 kAppendData = 0x00000004,
33 kAllAccess = 0x10000000,
34 kExecuteAccess = 0x20000000,
35 kWriteAccess = 0x40000000,
36 kReadAccess = 0x80000000,
37};
38
48
50enum class OpenAction : u8 {
51 kSuperseded,
52 kOpened,
53 kCreated,
54 kOverwritten,
55 kExists,
56 kDoesNotExist,
57};
58
60 Disposition disposition = Disposition::kOpen;
62 bool create_directory = false;
63 bool require_file = false;
64};
65
66} // namespace rex::filesystem
67
68template <>
69inline constexpr bool rex::is_flags_enum<rex::filesystem::Access> = true;
Access
Definition file_open.h:28
@ kReadAccess
Definition file_open.h:36
@ kExecuteAccess
Definition file_open.h:34
@ kWriteAccess
Definition file_open.h:35
Disposition
Definition file_open.h:40
@ kOverwriteIf
Definition file_open.h:46
@ kOpenIf
Definition file_open.h:44
@ kSupersede
Definition file_open.h:41
@ kCreate
Definition file_open.h:43
@ kOverwrite
Definition file_open.h:45
@ kOpen
Definition file_open.h:42
OpenAction
Definition file_open.h:50
constexpr bool is_flags_enum
Definition bit.h:422
constexpr bool HasFlags(E value, E flags)
Definition bit.h:483
Definition file_open.h:59
Integer types, byte order wrappers and size literals.