Opens path and returns its file descriptor. flags is either the
open(2) flags as a number (from constants), which fails with
code ELOOP when O_NOFOLLOW meets a symbolic link, or a mode string:
"a" to append, creating the file; "w" to write, creating or
truncating it; "r" to read, as for a directory to be flushed.
Throws when it cannot.
Opens
pathand returns its file descriptor.flagsis either the open(2) flags as a number (from constants), which fails withcodeELOOP when O_NOFOLLOW meets a symbolic link, or a mode string:"a"to append, creating the file;"w"to write, creating or truncating it;"r"to read, as for a directory to be flushed. Throws when it cannot.