9 enum io_mode
// known unix file IO modes
15 io_append
= 4, // append, plus allow reads
18 enum access_mode
// ways to open a file
20 a_createonly
= 0, // create, fail if file exists
21 a_create
= 1, // create if doesn't exist, else truncate
22 a_useonly
= 2, // use (no truncate) fail if doesn't exist
23 a_use
= 3, // use (no truncate), create if doesn't exist
26 enum state_value
// File states
28 _good
= 0, // all is well
30 _fail
= 2, // logical or physical IO error
31 _bad
= 4 // unopened/corrupted