aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/io/OpenFileFlag.hpp
blob: 3319bb4fa1eef1a187feeaaccf873edfb715c827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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