mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: add open_file function
This commit is contained in:

committed by
Alexander Medvednikov

parent
5deb29a7c9
commit
ae3d84df6b
15
vlib/os/const_nix.v
Normal file
15
vlib/os/const_nix.v
Normal file
@ -0,0 +1,15 @@
|
||||
module os
|
||||
|
||||
// File modes
|
||||
const (
|
||||
O_RDONLY = 000000000 // open the file read-only.
|
||||
O_WRONLY = 000000001 // open the file write-only.
|
||||
O_RDWR = 000000002 // open the file read-write.
|
||||
O_CREATE = 000000100 // create a new file if none exists.
|
||||
O_EXCL = 000000200 // used with O_CREATE, file must not exist.
|
||||
O_NOCTTY = 000000400 // if file is terminal, don't make it the controller terminal
|
||||
O_TRUNC = 000001000 // truncate regular writable file when opened.
|
||||
O_APPEND = 000002000 // append data to the file when writing.
|
||||
O_NONBLOCK = 000004000 // prevents blocking when opening files
|
||||
O_SYNC = 000010000 // open for synchronous I/O.
|
||||
)
|
Reference in New Issue
Block a user