Opens a file relative to a file descriptor.
fn openat(dir: i32, path: &CStr, flags: i32, mode: u16) -> i32
| Name | Description |
|---|---|
| dir | The file descriptor relative to which relative paths are interpreted. |
| path | The path of the file. |
| flags | The flags used to open the file. |
| mode | The mode used to create new files. |
Rteruns an open file descriptor or an error value.
Unless lrs was compiled with the no-auto-cloexec flag, this function automatically adds the O_CLOEXEC flag. This function automatically adds the O_LARGEFILE flag.