4#include "../macros.hpp"
5#include "../utility/utility.hpp"
8hi_export_module(hikogui.file.access_mode);
10hi_export
namespace hi {
inline namespace v1 {
39 return static_cast<access_mode>(std::to_underlying(lhs) | std::to_underlying(rhs));
44 return static_cast<access_mode>(std::to_underlying(lhs) & std::to_underlying(rhs));
47hi_export [[nodiscard]]
constexpr bool to_bool(
access_mode const& rhs)
noexcept
49 return to_bool(std::to_underlying(rhs));
access_mode
The mode in which way to open a file.
Definition access_mode.hpp:17
@ read_lock
Lock the file for reading, i.e. shared-lock.
Definition access_mode.hpp:21
@ sequential
Hint that the data should be prefetched.
Definition access_mode.hpp:27
@ create
Create file if it does not exist, or fail.
Definition access_mode.hpp:24
@ open
Open file if it exist, or fail.
Definition access_mode.hpp:23
@ random
Hint the data should not be prefetched.
Definition access_mode.hpp:26
@ open_for_read_and_write
Default open a file for reading and writing.
Definition access_mode.hpp:33
@ open_for_read
Default open a file for reading.
Definition access_mode.hpp:32
@ write_through
Hint that writes should be send directly to disk.
Definition access_mode.hpp:29
@ write_lock
Lock the file for writing, i.e. exclusive-lock.
Definition access_mode.hpp:22
@ no_reuse
Hint that the data should not be cached.
Definition access_mode.hpp:28
@ rename
Allow renaming an open file.
Definition access_mode.hpp:20
@ read
Allow read access to a file.
Definition access_mode.hpp:18
@ write
Allow write access to a file.
Definition access_mode.hpp:19
@ create_directories
Create directory hierarchy, if the file could not be created.
Definition access_mode.hpp:30
The HikoGUI namespace.
Definition array_generic.hpp:21
The HikoGUI API version 1.
Definition array_generic.hpp:22
constexpr Out truncate(In rhs) noexcept
Cast between integral types truncating or zero-extending the result.
Definition cast.hpp:544