Function rustix::fs::openat

source ·
pub fn openat<P: Arg, Fd: AsFd>(
    dirfd: Fd,
    path: P,
    oflags: OFlags,
    create_mode: Mode
) -> Result<OwnedFd>
Expand description

openat(dirfd, path, oflags, mode)—Opens a file.

POSIX guarantees that openat will use the lowest unused file descriptor, however it is not safe in general to rely on this, as file descriptors may be unexpectedly allocated on other threads or in libraries.

The Mode argument is only significant when creating a file.

References