aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/io/OpenFileFlag.h
blob: b0bceddc935092dbde93d6e26a61f5f666c5b8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include "../Bitmask.h"

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