pub fn open_path(path: &CStr, flags: c_int, mode: c_uint) -> Option<RawFd>
open(path, flags, mode) — prefers libc over std::fs::OpenOptions so directories open with O_RDONLY (archive walks) and we avoid extra syscalls.
open(path, flags, mode)
std::fs::OpenOptions
O_RDONLY