aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/common')
-rw-r--r--include/cru/common/io/OpenFileFlag.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/cru/common/io/OpenFileFlag.hpp b/include/cru/common/io/OpenFileFlag.hpp
new file mode 100644
index 00000000..3319bb4f
--- /dev/null
+++ b/include/cru/common/io/OpenFileFlag.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "../Bitmask.hpp"
+
+namespace cru::io {
+namespace details {
+struct OpenFileFlagTag {};
+} // namespace details
+using OpenFileFlag = Bitmask<details::OpenFileFlagTag>;
+
+struct OpenFileFlags {
+ static constexpr OpenFileFlag Read{0x1};
+ static constexpr OpenFileFlag Write{0x2};
+ static constexpr OpenFileFlag Append{0x4};
+ static constexpr OpenFileFlag Create{0x8};
+ static constexpr OpenFileFlag ThrowOnExist{0x10};
+};
+} // namespace cru::io