github.com/primecitizens/pcz/std@v0.2.1/ffi/wasm/wasi/stat.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2023 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 //go:build wasip1 9 10 package wasi 11 12 import ( 13 "unsafe" 14 ) 15 16 type Stat_t struct { 17 Dev uint64 18 Ino uint64 19 Filetype Filetype 20 Nlink uint64 21 Size_ uint64 22 Atime uint64 23 Mtime uint64 24 Ctime uint64 25 26 Mode int 27 28 // Uid and Gid are always zero on wasip1 platforms 29 Uid uint32 30 Gid uint32 31 } 32 33 //go:wasmimport wasi_snapshot_preview1 path_filestat_get 34 //go:noescape 35 func StatPath( 36 dirFD FD, 37 flags LookupFlags, 38 path unsafe.Pointer, 39 pathLen Size, 40 buf unsafe.Pointer, 41 ) Errno 42 43 //go:wasmimport wasi_snapshot_preview1 fd_filestat_get 44 //go:noescape 45 func StatFD(fd FD, buf unsafe.Pointer) Errno