Opens a file with custom flags.
impl File {
fn open<P>(path: P, flags: FileFlags, mode: Mode) -> Result<File, Errno>
where P: ToCString,
}| Name | Description |
|---|---|
| path | The path of the file to be opened. |
| flags | The flags to be used when opening a file. |
| mode | The mode a new file has. |
Return the opened file.
The mode argument is ignored unless a new file is created via the FILE_CREATE or the FILE_TEMP flags.
If the path is relative, it is interpreted relative to the current working directory.
Unless lrs was compiled with the no-auto-cloexec flag, the opened file always has the O_CLOEXEC flag set.