Function stat [src]

Prototype

pub fn stat(pathname: [*:0]const u8, statbuf: *Stat) usize

Parameters

pathname: [*:0]const u8statbuf: *Stat

Source

pub fn stat(pathname: [*:0]const u8, statbuf: *Stat) usize { if (native_arch == .riscv32) { // riscv32 has made the interesting decision to not implement some of // the older stat syscalls, including this one. @compileError("No stat syscall on this architecture."); } else if (@hasField(SYS, "stat64")) { return syscall2(.stat64, @intFromPtr(pathname), @intFromPtr(statbuf)); } else { return syscall2(.stat, @intFromPtr(pathname), @intFromPtr(statbuf)); } }