Function obnth::open_beneath [−][src]
pub fn open_beneath<P: AsPath>(
dir_fd: RawFd,
path: P,
flags: c_int,
mode: mode_t,
lookup_flags: LookupFlags
) -> Result<File>
Open a file beneath the specified directory.
This is equivalent to libc::openat(dir_fd, path, flags, mode)
except for the following
differences:
- The resolved file is guaranteed to be within the directory referred to by
dir_fd
. - The
lookup_flags
argument can further alter behavior during path resolution; seeLookupFlags
for more information. - The file will be opened with
O_CLOEXEC|O_NOCTTY
, so its close-on-exec flag will be set and it cannot become the process's controlling terminal.