github.com/primecitizens/pcz/std@v0.2.1/ffi/wasm/wasi/prestat.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 //go:build wasip1 5 6 package wasi 7 8 import ( 9 "unsafe" 10 ) 11 12 type PrestatType = uint8 13 14 const ( 15 PreopenType_DIR PrestatType = iota 16 ) 17 18 type PrestatDir struct { 19 PrestateNameLen Size 20 } 21 22 type Prestat_t struct { 23 Type PrestatType 24 Dir PrestatDir 25 } 26 27 //go:wasmimport wasi_snapshot_preview1 fd_prestat_get 28 //go:noescape 29 func Prestat(fd FD, prestat unsafe.Pointer) Errno 30 31 //go:wasmimport wasi_snapshot_preview1 fd_prestat_dir_name 32 //go:noescape 33 func PrestatDirname(fd FD, buf unsafe.Pointer, len Size) Errno