MCPcopy Index your code
hub / github.com/RustPython/RustPython / openat

Function openat

crates/common/src/crt_fd.rs:322–324  ·  view source on GitHub ↗
(dir: Borrowed<'_>, path: &ffi::CStr, flags: i32, mode: i32)

Source from the content-addressed store, hash-verified

320
321#[cfg(all(any(unix, target_os = "wasi"), not(target_os = "redox")))]
322pub fn openat(dir: Borrowed<'_>, path: &ffi::CStr, flags: i32, mode: i32) -> io::Result<Owned> {
323 cvt_fd(unsafe { c::openat(dir.as_raw(), path.as_ptr(), flags, mode) })
324}
325
326pub fn fsync(fd: Borrowed<'_>) -> io::Result<()> {
327 cvt(unsafe { suppress_iph!(c::fsync(fd.as_raw())) })?;

Callers 1

os_openFunction · 0.85

Calls 3

cvt_fdFunction · 0.85
as_rawMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected