open_mode

NAME

open_mode - file open mode

SYNOPSIS

enum class open_mode;

COMMON

none //  indicates that the open mode has not been evaluated yet
app  //  ["a"]seek to the end of stream before each write.
out  //  ["w"]open for writing.
in   //  ["r"]open for reading.
text
//[inverse of "b"]open in text mode. native_file is always binary.
//The text mode is provided by the POSIX layer or C FILE layer.
// When native_file is win32_file or nt_file or zw_file or
// unsupported character type for C FILE* or C++ filebuf,
// throw invalid arguments eh.

posix

creat      //  O_CREAT
direct     //  *O_DIRECT
directory  //  *O_DIRECTORY.
search     //  O_SEARCH
sync       //  *O_SYNC
trunc      //  *O_TRUNC
tty_init   //  O_TTY_INIT
no_block   //  *O_NONBLOCK
excl       //  *["x"]O_EXCL
follow     //  *Inverse of POSIX O_NOFOLLOW.
inherit    //  *Inverse of POSIX O_CLOEXEC.

windows_and_linux

temporary
//*[Linux]O_TMPFILE.
//[Windows]FILE_ATTRIBUTE_TEMPORARY
//0x100 + FILE_FLAG_DELETE_ON_CLOSE 0x04000000

linux

no_atime   //  O_NOATIME
no_ctty    //  O_NOCTTY
path       //  O_PATH

windows

archive          //  FILE_ATTRIBUTE_ARCHIVE
case_insensitive //  NT OBJ_CASE_INSENSITIVE
compressed       //  FILE_ATTRIBUTE_COMPRESSED
encrypted        //  FILE_ATTRIBUTE_ENCRYPTED
hidden           //  FILE_ATTRIBUTE_HIDDEN
no_recall        //  FILE_FLAG_OPEN_NO_RECALL
normal           //  FILE_ATTRIBUTE_NORMAL
offline          //  FILE_ATTRIBUTE_OFFLINE
random_access    //  FILE_FLAG_RANDOM_ACCESS
session_aware    //  FILE_FLAG_SESSION_AWARE
system           //  FILE_ATTRIBUTE_SYSTEM

DESCRIPTION

Enum class open_mode support bit operation, It has overloaded operators, which are &, | , ^, ~, &=, |=, ^= . their behaviors are consiste with builtin bit operators.

EXAMPLE

see also