1package fs 2 3import "syscall" 4 5// Flags to OpenFile wrapping those of the underlying system. Not all flags may 6// be implemented on a given system. 7const ( 8 O_RDONLY int = syscall.O_RDONLY // open the file read-only. 9 O_WRONLY int = syscall.O_WRONLY // open the file write-only. 10 O_RDWR int = syscall.O_RDWR // open the file read-write. 11 O_APPEND int = syscall.O_APPEND // append data to the file when writing. 12 O_CREATE int = syscall.O_CREAT // create a new file if none exists. 13 O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist 14 O_SYNC int = syscall.O_SYNC // open for synchronous I/O. 15 O_TRUNC int = syscall.O_TRUNC // if possible, truncate file when opened. 16 O_NONBLOCK int = syscall.O_NONBLOCK // don't block open on fifos etc. 17) 18