mclangc/include/fs.mcl

20 lines
1.3 KiB
Plaintext
Raw Normal View History

macro FS_O_APPEND 1024 end // append to existing file
macro FS_O_ASYNC 8192 end // use signal-driven IO
macro FS_O_CLOEXEC 524288 end // use close-on-exec (avoid race conditions and lock contentions)
macro FS_O_CREAT 64 end // create file if it doesnt exist
macro FS_O_DIRECT 16384 end // bypass cache (slower)
macro FS_O_DIRECTORY 65536 end // fail if pathname isnt a directory
macro FS_O_DSYNC 4096 end // ensure output is sent to hardware and metadata written before return
macro FS_O_EXCL 128 end // ensure creation of file
macro FS_O_LARGEFILE 0 end // allows use of file sizes represented by off64_t
macro FS_O_NOATIME 262144 end // do not increment access time upon open
macro FS_O_NOCTTY 256 end // if pathname is a terminal device, dont become controlling terminal
macro FS_O_NOFOLLOW 131072 end // fail if pathname is symbolic link
macro FS_O_NONBLOCK 2048 end // if possible, open file with non-blocking IO
macro FS_O_NDELAY 2048 end // same as O_NONBLOCK
macro FS_O_PATH 2097152 end // open descriptor for obtaining permissions and status of a file but does not allow read/write operations
macro FS_O_SYNC 1052672 end // wait for IO to complete before returning
macro FS_O_TMPFILE 4259840 end // create an unnamed, unreachable (via any other open call) temporary file
macro FS_O_TRUNC 512 end // if file exists, ovewrite it (careful!)