Function nix::fcntl::openat

source ·
pub fn openat<P: ?Sized + NixPath>(
    dirfd: Option<RawFd>,
    path: &P,
    oflag: OFlag,
    mode: Mode
) -> Result<RawFd>
Available on crate feature fs only.
Expand description

open or create a file for reading, writing or executing

The openat function is equivalent to the open function except in the case where the path specifies a relative path. In that case, the file to be opened is determined relative to the directory associated with the file descriptor fd.

§See Also

openat