stat
TypeScriptstatic stat(path: SDKHandle, s: SDKHandle): { $ret: number; $out: { "s": SDKHandle } }Swift declarationstatic func stat(_ path: UnsafePointer<CChar>, _ s: inout CInterop.Stat) -> Int32Calls the C `stat()` function. This is a direct wrapper around the C `stat()` system call. For a more ergonomic Swift API, use `Stat` instead. - Warning: This API is primarily intended for migration purposes when supporting older deployment targets. If your deployment target supports it, prefer using the `Stat` API introduced in SYS-0006, which provides type-safe, ergonomic access to file metadata in Swift. - Parameters: - path: A null-terminated C string representing the file path. - s: An `inout` reference to a `CInterop.Stat` struct to populate. - Returns: 0 on success, -1 on error (check `Errno.current`).
Omit the output parameters from the call. The result contains $ret and $out, with s inside $out.