| 1 | module os |
| 2 | |
| 3 | const max_path_buffer_size = max_path_len |
| 4 | |
| 5 | const o_binary = 0 // input and output is not translated; the default on unix |
| 6 | |
| 7 | const o_rdonly = C.O_RDONLY // open the file read-only. |
| 8 | |
| 9 | const o_wronly = C.O_WRONLY // open the file write-only. |
| 10 | |
| 11 | const o_rdwr = C.O_RDWR // open the file read-write. |
| 12 | |
| 13 | const o_create = C.O_CREAT // create a new file if none exists. |
| 14 | |
| 15 | const o_excl = C.O_EXCL // used with o_create, file must not exist. |
| 16 | |
| 17 | const o_noctty = C.O_NOCTTY // if file is terminal, don't make it the controller terminal |
| 18 | |
| 19 | const o_trunc = C.O_TRUNC // truncate regular writable file when opened. |
| 20 | |
| 21 | const o_append = C.O_APPEND // append data to the file when writing. |
| 22 | |
| 23 | const o_nonblock = C.O_NONBLOCK // prevents blocking when opening files |
| 24 | |
| 25 | const o_sync = C.O_SYNC |
| 26 | |