$53 GRAYBYTE WORDPRESS FILE MANAGER $42

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/golang/src/syscall/

HOME
Current File : /lib/golang/src/syscall//fs_wasip1.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build wasip1

package syscall

import (
	"internal/stringslite"
	"runtime"
	"structs"
	"unsafe"
)

func init() {
	// Try to set stdio to non-blocking mode before the os package
	// calls NewFile for each fd. NewFile queries the non-blocking flag
	// but doesn't change it, even if the runtime supports non-blocking
	// stdio. Since WebAssembly modules are single-threaded, blocking
	// system calls temporarily halt execution of the module. If the
	// runtime supports non-blocking stdio, the Go runtime is able to
	// use the WASI net poller to poll for read/write readiness and is
	// able to schedule goroutines while waiting.
	SetNonblock(0, true)
	SetNonblock(1, true)
	SetNonblock(2, true)
}

type uintptr32 = uint32
type size = uint32
type fdflags = uint32
type filesize = uint64
type filetype = uint8
type lookupflags = uint32
type oflags = uint32
type rights = uint64
type timestamp = uint64
type dircookie = uint64
type filedelta = int64
type fstflags = uint32

type iovec struct {
	_      structs.HostLayout
	buf    uintptr32
	bufLen size
}

const (
	LOOKUP_SYMLINK_FOLLOW = 0x00000001
)

const (
	OFLAG_CREATE    = 0x0001
	OFLAG_DIRECTORY = 0x0002
	OFLAG_EXCL      = 0x0004
	OFLAG_TRUNC     = 0x0008
)

const (
	FDFLAG_APPEND   = 0x0001
	FDFLAG_DSYNC    = 0x0002
	FDFLAG_NONBLOCK = 0x0004
	FDFLAG_RSYNC    = 0x0008
	FDFLAG_SYNC     = 0x0010
)

const (
	RIGHT_FD_DATASYNC = 1 << iota
	RIGHT_FD_READ
	RIGHT_FD_SEEK
	RIGHT_FDSTAT_SET_FLAGS
	RIGHT_FD_SYNC
	RIGHT_FD_TELL
	RIGHT_FD_WRITE
	RIGHT_FD_ADVISE
	RIGHT_FD_ALLOCATE
	RIGHT_PATH_CREATE_DIRECTORY
	RIGHT_PATH_CREATE_FILE
	RIGHT_PATH_LINK_SOURCE
	RIGHT_PATH_LINK_TARGET
	RIGHT_PATH_OPEN
	RIGHT_FD_READDIR
	RIGHT_PATH_READLINK
	RIGHT_PATH_RENAME_SOURCE
	RIGHT_PATH_RENAME_TARGET
	RIGHT_PATH_FILESTAT_GET
	RIGHT_PATH_FILESTAT_SET_SIZE
	RIGHT_PATH_FILESTAT_SET_TIMES
	RIGHT_FD_FILESTAT_GET
	RIGHT_FD_FILESTAT_SET_SIZE
	RIGHT_FD_FILESTAT_SET_TIMES
	RIGHT_PATH_SYMLINK
	RIGHT_PATH_REMOVE_DIRECTORY
	RIGHT_PATH_UNLINK_FILE
	RIGHT_POLL_FD_READWRITE
	RIGHT_SOCK_SHUTDOWN
	RIGHT_SOCK_ACCEPT
)

const (
	WHENCE_SET = 0
	WHENCE_CUR = 1
	WHENCE_END = 2
)

const (
	FILESTAT_SET_ATIM     = 0x0001
	FILESTAT_SET_ATIM_NOW = 0x0002
	FILESTAT_SET_MTIM     = 0x0004
	FILESTAT_SET_MTIM_NOW = 0x0008
)

const (
	// Despite the rights being defined as a 64 bits integer in the spec,
	// wasmtime crashes the program if we set any of the upper 32 bits.
	fullRights  = rights(^uint32(0))
	readRights  = rights(RIGHT_FD_READ | RIGHT_FD_READDIR)
	writeRights = rights(RIGHT_FD_DATASYNC | RIGHT_FD_WRITE | RIGHT_FD_ALLOCATE | RIGHT_PATH_FILESTAT_SET_SIZE)

	// Some runtimes have very strict expectations when it comes to which
	// rights can be enabled on files opened by path_open. The fileRights
	// constant is used as a mask to retain only bits for operations that
	// are supported on files.
	fileRights rights = RIGHT_FD_DATASYNC |
		RIGHT_FD_READ |
		RIGHT_FD_SEEK |
		RIGHT_FDSTAT_SET_FLAGS |
		RIGHT_FD_SYNC |
		RIGHT_FD_TELL |
		RIGHT_FD_WRITE |
		RIGHT_FD_ADVISE |
		RIGHT_FD_ALLOCATE |
		RIGHT_PATH_CREATE_DIRECTORY |
		RIGHT_PATH_CREATE_FILE |
		RIGHT_PATH_LINK_SOURCE |
		RIGHT_PATH_LINK_TARGET |
		RIGHT_PATH_OPEN |
		RIGHT_FD_READDIR |
		RIGHT_PATH_READLINK |
		RIGHT_PATH_RENAME_SOURCE |
		RIGHT_PATH_RENAME_TARGET |
		RIGHT_PATH_FILESTAT_GET |
		RIGHT_PATH_FILESTAT_SET_SIZE |
		RIGHT_PATH_FILESTAT_SET_TIMES |
		RIGHT_FD_FILESTAT_GET |
		RIGHT_FD_FILESTAT_SET_SIZE |
		RIGHT_FD_FILESTAT_SET_TIMES |
		RIGHT_PATH_SYMLINK |
		RIGHT_PATH_REMOVE_DIRECTORY |
		RIGHT_PATH_UNLINK_FILE |
		RIGHT_POLL_FD_READWRITE

	// Runtimes like wasmtime and wasmedge will refuse to open directories
	// if the rights requested by the application exceed the operations that
	// can be performed on a directory.
	dirRights rights = RIGHT_FD_SEEK |
		RIGHT_FDSTAT_SET_FLAGS |
		RIGHT_FD_SYNC |
		RIGHT_PATH_CREATE_DIRECTORY |
		RIGHT_PATH_CREATE_FILE |
		RIGHT_PATH_LINK_SOURCE |
		RIGHT_PATH_LINK_TARGET |
		RIGHT_PATH_OPEN |
		RIGHT_FD_READDIR |
		RIGHT_PATH_READLINK |
		RIGHT_PATH_RENAME_SOURCE |
		RIGHT_PATH_RENAME_TARGET |
		RIGHT_PATH_FILESTAT_GET |
		RIGHT_PATH_FILESTAT_SET_SIZE |
		RIGHT_PATH_FILESTAT_SET_TIMES |
		RIGHT_FD_FILESTAT_GET |
		RIGHT_FD_FILESTAT_SET_TIMES |
		RIGHT_PATH_SYMLINK |
		RIGHT_PATH_REMOVE_DIRECTORY |
		RIGHT_PATH_UNLINK_FILE
)

// https://github.com/WebAssembly/WASI/blob/a2b96e81c0586125cc4dc79a5be0b78d9a059925/legacy/preview1/docs.md#-fd_closefd-fd---result-errno
//
//go:wasmimport wasi_snapshot_preview1 fd_close
//go:noescape
func fd_close(fd int32) Errno

// https://github.com/WebAssembly/WASI/blob/a2b96e81c0586125cc4dc79a5be0b78d9a059925/legacy/preview1/docs.md#-fd_filestat_set_sizefd-fd-size-filesize---result-errno
//
//go:wasmimport wasi_snapshot_preview1 fd_filestat_set_size
//go:noescape
func fd_filestat_set_size(fd int32, set_size filesize) Errno

// https://github.com/WebAssembly/WASI/blob/a2b96e81c0586125cc4dc79a5be0b78d9a059925/legacy/preview1/docs.md#-fd_preadfd-fd-iovs-iovec_array-offset-filesize---resultsize-errno
//
//go:wasmimport wasi_snapshot_preview1 fd_pread
//go:noescape
func fd_pread(fd int32, iovs *iovec, iovsLen size, offset filesize, nread *size) Errno

//go:wasmimport wasi_snapshot_preview1 fd_pwrite
//go:noescape
func fd_pwrite(fd int32, iovs *iovec, iovsLen size, offset filesize, nwritten *size) Errno

//go:wasmimport wasi_snapshot_preview1 fd_read
//go:noescape
func fd_read(fd int32, iovs *iovec, iovsLen size, nread *size) Errno

//go:wasmimport wasi_snapshot_preview1 fd_readdir
//go:noescape
func fd_readdir(fd int32, buf *byte, bufLen size, cookie dircookie, nwritten *size) Errno

//go:wasmimport wasi_snapshot_preview1 fd_seek
//go:noescape
func fd_seek(fd int32, offset filedelta, whence uint32, newoffset *filesize) Errno

// https://github.com/WebAssembly/WASI/blob/a2b96e81c0586125cc4dc79a5be0b78d9a059925/legacy/preview1/docs.md#-fd_fdstat_set_rightsfd-fd-fs_rights_base-rights-fs_rights_inheriting-rights---result-errno
//
//go:wasmimport wasi_snapshot_preview1 fd_fdstat_set_rights
//go:noescape
func fd_fdstat_set_rights(fd int32, rightsBase rights, rightsInheriting rights) Errno

//go:wasmimport wasi_snapshot_preview1 fd_filestat_get
//go:noescape
func fd_filestat_get(fd int32, buf unsafe.Pointer) Errno

//go:wasmimport wasi_snapshot_preview1 fd_write
//go:noescape
func fd_write(fd int32, iovs *iovec, iovsLen size, nwritten *size) Errno

//go:wasmimport wasi_snapshot_preview1 fd_sync
//go:noescape
func fd_sync(fd int32) Errno

//go:wasmimport wasi_snapshot_preview1 path_create_directory
//go:noescape
func path_create_directory(fd int32, path *byte, pathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_filestat_get
//go:noescape
func path_filestat_get(fd int32, flags lookupflags, path *byte, pathLen size, buf unsafe.Pointer) Errno

//go:wasmimport wasi_snapshot_preview1 path_filestat_set_times
//go:noescape
func path_filestat_set_times(fd int32, flags lookupflags, path *byte, pathLen size, atim timestamp, mtim timestamp, fstflags fstflags) Errno

//go:wasmimport wasi_snapshot_preview1 path_link
//go:noescape
func path_link(oldFd int32, oldFlags lookupflags, oldPath *byte, oldPathLen size, newFd int32, newPath *byte, newPathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_readlink
//go:noescape
func path_readlink(fd int32, path *byte, pathLen size, buf *byte, bufLen size, nwritten *size) Errno

//go:wasmimport wasi_snapshot_preview1 path_remove_directory
//go:noescape
func path_remove_directory(fd int32, path *byte, pathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_rename
//go:noescape
func path_rename(oldFd int32, oldPath *byte, oldPathLen size, newFd int32, newPath *byte, newPathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_symlink
//go:noescape
func path_symlink(oldPath *byte, oldPathLen size, fd int32, newPath *byte, newPathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_unlink_file
//go:noescape
func path_unlink_file(fd int32, path *byte, pathLen size) Errno

//go:wasmimport wasi_snapshot_preview1 path_open
//go:noescape
func path_open(rootFD int32, dirflags lookupflags, path *byte, pathLen size, oflags oflags, fsRightsBase rights, fsRightsInheriting rights, fsFlags fdflags, fd *int32) Errno

//go:wasmimport wasi_snapshot_preview1 random_get
//go:noescape
func random_get(buf *byte, bufLen size) Errno

// https://github.com/WebAssembly/WASI/blob/a2b96e81c0586125cc4dc79a5be0b78d9a059925/legacy/preview1/docs.md#-fdstat-record
// fdflags must be at offset 2, hence the uint16 type rather than the
// fdflags (uint32) type.
type fdstat struct {
	_                structs.HostLayout
	filetype         filetype
	fdflags          uint16
	rightsBase       rights
	rightsInheriting rights
}

//go:wasmimport wasi_snapshot_preview1 fd_fdstat_get
//go:noescape
func fd_fdstat_get(fd int32, buf *fdstat) Errno

//go:wasmimport wasi_snapshot_preview1 fd_fdstat_set_flags
//go:noescape
func fd_fdstat_set_flags(fd int32, flags fdflags) Errno

// fd_fdstat_get_flags is accessed from internal/syscall/unix
//go:linkname fd_fdstat_get_flags

func fd_fdstat_get_flags(fd int) (uint32, error) {
	var stat fdstat
	errno := fd_fdstat_get(int32(fd), &stat)
	return uint32(stat.fdflags), errnoErr(errno)
}

// fd_fdstat_get_type is accessed from net
//go:linkname fd_fdstat_get_type

func fd_fdstat_get_type(fd int) (uint8, error) {
	var stat fdstat
	errno := fd_fdstat_get(int32(fd), &stat)
	return stat.filetype, errnoErr(errno)
}

type preopentype = uint8

const (
	preopentypeDir preopentype = iota
)

type prestatDir struct {
	_         structs.HostLayout
	prNameLen size
}

type prestat struct {
	_   structs.HostLayout
	typ preopentype
	dir prestatDir
}

//go:wasmimport wasi_snapshot_preview1 fd_prestat_get
//go:noescape
func fd_prestat_get(fd int32, prestat *prestat) Errno

//go:wasmimport wasi_snapshot_preview1 fd_prestat_dir_name
//go:noescape
func fd_prestat_dir_name(fd int32, path *byte, pathLen size) Errno

type opendir struct {
	fd   int32
	name string
}

// List of preopen directories that were exposed by the runtime. The first one
// is assumed to the be root directory of the file system, and others are seen
// as mount points at sub paths of the root.
var preopens []opendir

// Current working directory. We maintain this as a string and resolve paths in
// the code because wasmtime does not allow relative path lookups outside of the
// scope of a directory; a previous approach we tried consisted in maintaining
// open a file descriptor to the current directory so we could perform relative
// path lookups from that location, but it resulted in breaking path resolution
// from the current directory to its parent.
var cwd string

func init() {
	dirNameBuf := make([]byte, 256)
	// We start looking for preopens at fd=3 because 0, 1, and 2 are reserved
	// for standard input and outputs.
	for preopenFd := int32(3); ; preopenFd++ {
		var prestat prestat

		errno := fd_prestat_get(preopenFd, &prestat)
		if errno == EBADF {
			break
		}
		if errno == ENOTDIR || prestat.typ != preopentypeDir {
			continue
		}
		if errno != 0 {
			panic("fd_prestat: " + errno.Error())
		}
		if int(prestat.dir.prNameLen) > len(dirNameBuf) {
			dirNameBuf = make([]byte, prestat.dir.prNameLen)
		}

		errno = fd_prestat_dir_name(preopenFd, &dirNameBuf[0], prestat.dir.prNameLen)
		if errno != 0 {
			panic("fd_prestat_dir_name: " + errno.Error())
		}

		preopens = append(preopens, opendir{
			fd:   preopenFd,
			name: string(dirNameBuf[:prestat.dir.prNameLen]),
		})
	}

	if cwd, _ = Getenv("PWD"); cwd != "" {
		cwd = joinPath("/", cwd)
	} else if len(preopens) > 0 {
		cwd = preopens[0].name
	}
}

// Provided by package runtime.
func now() (sec int64, nsec int32)

//go:nosplit
func appendCleanPath(buf []byte, path string, lookupParent bool) ([]byte, bool) {
	i := 0
	for i < len(path) {
		for i < len(path) && path[i] == '/' {
			i++
		}

		j := i
		for j < len(path) && path[j] != '/' {
			j++
		}

		s := path[i:j]
		i = j

		switch s {
		case "":
			continue
		case ".":
			continue
		case "..":
			if !lookupParent {
				k := len(buf)
				for k > 0 && buf[k-1] != '/' {
					k--
				}
				for k > 1 && buf[k-1] == '/' {
					k--
				}
				buf = buf[:k]
				if k == 0 {
					lookupParent = true
				} else {
					s = ""
					continue
				}
			}
		default:
			lookupParent = false
		}

		if len(buf) > 0 && buf[len(buf)-1] != '/' {
			buf = append(buf, '/')
		}
		buf = append(buf, s...)
	}
	return buf, lookupParent
}

// joinPath concatenates dir and file paths, producing a cleaned path where
// "." and ".." have been removed, unless dir is relative and the references
// to parent directories in file represented a location relative to a parent
// of dir.
//
// This function is used for path resolution of all wasi functions expecting
// a path argument; the returned string is heap allocated, which we may want
// to optimize in the future. Instead of returning a string, the function
// could append the result to an output buffer that the functions in this
// file can manage to have allocated on the stack (e.g. initializing to a
// fixed capacity). Since it will significantly increase code complexity,
// we prefer to optimize for readability and maintainability at this time.
func joinPath(dir, file string) string {
	buf := make([]byte, 0, len(dir)+len(file)+1)
	if isAbs(dir) {
		buf = append(buf, '/')
	}
	buf, lookupParent := appendCleanPath(buf, dir, false)
	buf, _ = appendCleanPath(buf, file, lookupParent)
	// The appendCleanPath function cleans the path so it does not inject
	// references to the current directory. If both the dir and file args
	// were ".", this results in the output buffer being empty so we handle
	// this condition here.
	if len(buf) == 0 {
		buf = append(buf, '.')
	}
	// If the file ended with a '/' we make sure that the output also ends
	// with a '/'. This is needed to ensure that programs have a mechanism
	// to represent dereferencing symbolic links pointing to directories.
	if buf[len(buf)-1] != '/' && isDir(file) {
		buf = append(buf, '/')
	}
	return unsafe.String(&buf[0], len(buf))
}

func isAbs(path string) bool {
	return stringslite.HasPrefix(path, "/")
}

func isDir(path string) bool {
	return stringslite.HasSuffix(path, "/")
}

// preparePath returns the preopen file descriptor of the directory to perform
// path resolution from, along with the pair of pointer and length for the
// relative expression of path from the directory.
//
// If the path argument is not absolute, it is first appended to the current
// working directory before resolution.
func preparePath(path string) (int32, *byte, size) {
	var dirFd = int32(-1)
	var dirName string

	dir := "/"
	if !isAbs(path) {
		dir = cwd
	}
	path = joinPath(dir, path)

	for _, p := range preopens {
		if len(p.name) > len(dirName) && stringslite.HasPrefix(path, p.name) {
			dirFd, dirName = p.fd, p.name
		}
	}

	path = path[len(dirName):]
	for isAbs(path) {
		path = path[1:]
	}
	if len(path) == 0 {
		path = "."
	}

	return dirFd, unsafe.StringData(path), size(len(path))
}

func Open(path string, openmode int, perm uint32) (int, error) {
	if path == "" {
		return -1, EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	return openat(dirFd, pathPtr, pathLen, openmode, perm)
}

func Openat(dirFd int, path string, openmode int, perm uint32) (int, error) {
	return openat(int32(dirFd), unsafe.StringData(path), size(len(path)), openmode, perm)
}

func openat(dirFd int32, pathPtr *byte, pathLen size, openmode int, perm uint32) (int, error) {
	var oflags oflags
	if (openmode & O_CREATE) != 0 {
		oflags |= OFLAG_CREATE
	}
	if (openmode & O_TRUNC) != 0 {
		oflags |= OFLAG_TRUNC
	}
	if (openmode & O_EXCL) != 0 {
		oflags |= OFLAG_EXCL
	}

	var rights rights
	switch openmode & (O_RDONLY | O_WRONLY | O_RDWR) {
	case O_RDONLY:
		rights = fileRights & ^writeRights
	case O_WRONLY:
		rights = fileRights & ^readRights
	case O_RDWR:
		rights = fileRights
	}

	if (openmode & O_DIRECTORY) != 0 {
		if openmode&(O_WRONLY|O_RDWR) != 0 {
			return -1, EISDIR
		}
		oflags |= OFLAG_DIRECTORY
		rights &= dirRights
	}

	var fdflags fdflags
	if (openmode & O_APPEND) != 0 {
		fdflags |= FDFLAG_APPEND
	}
	if (openmode & O_SYNC) != 0 {
		fdflags |= FDFLAG_SYNC
	}

	var lflags lookupflags
	if openmode&O_NOFOLLOW == 0 {
		lflags = LOOKUP_SYMLINK_FOLLOW
	}

	var fd int32
	errno := path_open(
		dirFd,
		lflags,
		pathPtr,
		pathLen,
		oflags,
		rights,
		fileRights,
		fdflags,
		&fd,
	)
	if errno == EISDIR && oflags == 0 && fdflags == 0 && ((rights & writeRights) == 0) {
		// wasmtime and wasmedge will error if attempting to open a directory
		// because we are asking for too many rights. However, we cannot
		// determine ahead of time if the path we are about to open is a
		// directory, so instead we fallback to a second call to path_open with
		// a more limited set of rights.
		//
		// This approach is subject to a race if the file system is modified
		// concurrently, so we also inject OFLAG_DIRECTORY to ensure that we do
		// not accidentally open a file which is not a directory.
		errno = path_open(
			dirFd,
			LOOKUP_SYMLINK_FOLLOW,
			pathPtr,
			pathLen,
			oflags|OFLAG_DIRECTORY,
			rights&dirRights,
			fileRights,
			fdflags,
			&fd,
		)
	}
	return int(fd), errnoErr(errno)
}

func Close(fd int) error {
	errno := fd_close(int32(fd))
	return errnoErr(errno)
}

func CloseOnExec(fd int) {
	// nothing to do - no exec
}

func Mkdir(path string, perm uint32) error {
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_create_directory(dirFd, pathPtr, pathLen)
	return errnoErr(errno)
}

func ReadDir(fd int, buf []byte, cookie dircookie) (int, error) {
	var nwritten size
	errno := fd_readdir(int32(fd), &buf[0], size(len(buf)), cookie, &nwritten)
	return int(nwritten), errnoErr(errno)
}

type Stat_t struct {
	Dev      uint64
	Ino      uint64
	Filetype uint8
	Nlink    uint64
	Size     uint64
	Atime    uint64
	Mtime    uint64
	Ctime    uint64

	Mode int

	// Uid and Gid are always zero on wasip1 platforms
	Uid uint32
	Gid uint32
}

func Stat(path string, st *Stat_t) error {
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_filestat_get(dirFd, LOOKUP_SYMLINK_FOLLOW, pathPtr, pathLen, unsafe.Pointer(st))
	setDefaultMode(st)
	return errnoErr(errno)
}

func Lstat(path string, st *Stat_t) error {
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_filestat_get(dirFd, 0, pathPtr, pathLen, unsafe.Pointer(st))
	setDefaultMode(st)
	return errnoErr(errno)
}

func Fstat(fd int, st *Stat_t) error {
	errno := fd_filestat_get(int32(fd), unsafe.Pointer(st))
	setDefaultMode(st)
	return errnoErr(errno)
}

func setDefaultMode(st *Stat_t) {
	// WASI does not support unix-like permissions, but Go programs are likely
	// to expect the permission bits to not be zero so we set defaults to help
	// avoid breaking applications that are migrating to WASM.
	if st.Filetype == FILETYPE_DIRECTORY {
		st.Mode = 0700
	} else {
		st.Mode = 0600
	}
}

func Unlink(path string) error {
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_unlink_file(dirFd, pathPtr, pathLen)
	return errnoErr(errno)
}

func Rmdir(path string) error {
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_remove_directory(dirFd, pathPtr, pathLen)
	return errnoErr(errno)
}

func Chmod(path string, mode uint32) error {
	var stat Stat_t
	return Stat(path, &stat)
}

func Fchmod(fd int, mode uint32) error {
	var stat Stat_t
	return Fstat(fd, &stat)
}

func Chown(path string, uid, gid int) error {
	return ENOSYS
}

func Fchown(fd int, uid, gid int) error {
	return ENOSYS
}

func Lchown(path string, uid, gid int) error {
	return ENOSYS
}

func UtimesNano(path string, ts []Timespec) error {
	// UTIME_OMIT value must match internal/syscall/unix/at_wasip1.go
	const UTIME_OMIT = -0x2
	if path == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	atime := TimespecToNsec(ts[0])
	mtime := TimespecToNsec(ts[1])
	if ts[0].Nsec == UTIME_OMIT || ts[1].Nsec == UTIME_OMIT {
		var st Stat_t
		if err := Stat(path, &st); err != nil {
			return err
		}
		if ts[0].Nsec == UTIME_OMIT {
			atime = int64(st.Atime)
		}
		if ts[1].Nsec == UTIME_OMIT {
			mtime = int64(st.Mtime)
		}
	}
	errno := path_filestat_set_times(
		dirFd,
		LOOKUP_SYMLINK_FOLLOW,
		pathPtr,
		pathLen,
		timestamp(atime),
		timestamp(mtime),
		FILESTAT_SET_ATIM|FILESTAT_SET_MTIM,
	)
	return errnoErr(errno)
}

func Rename(from, to string) error {
	if from == "" || to == "" {
		return EINVAL
	}
	oldDirFd, oldPathPtr, oldPathLen := preparePath(from)
	newDirFd, newPathPtr, newPathLen := preparePath(to)
	errno := path_rename(
		oldDirFd,
		oldPathPtr,
		oldPathLen,
		newDirFd,
		newPathPtr,
		newPathLen,
	)
	return errnoErr(errno)
}

func Truncate(path string, length int64) error {
	if path == "" {
		return EINVAL
	}
	fd, err := Open(path, O_WRONLY, 0)
	if err != nil {
		return err
	}
	defer Close(fd)
	return Ftruncate(fd, length)
}

func Ftruncate(fd int, length int64) error {
	errno := fd_filestat_set_size(int32(fd), filesize(length))
	return errnoErr(errno)
}

const ImplementsGetwd = true

func Getwd() (string, error) {
	return cwd, nil
}

func Chdir(path string) error {
	if path == "" {
		return EINVAL
	}

	dir := "/"
	if !isAbs(path) {
		dir = cwd
	}
	path = joinPath(dir, path)

	var stat Stat_t
	dirFd, pathPtr, pathLen := preparePath(path)
	errno := path_filestat_get(dirFd, LOOKUP_SYMLINK_FOLLOW, pathPtr, pathLen, unsafe.Pointer(&stat))
	if errno != 0 {
		return errnoErr(errno)
	}
	if stat.Filetype != FILETYPE_DIRECTORY {
		return ENOTDIR
	}
	cwd = path
	return nil
}

func Readlink(path string, buf []byte) (n int, err error) {
	if path == "" {
		return 0, EINVAL
	}
	if len(buf) == 0 {
		return 0, nil
	}
	dirFd, pathPtr, pathLen := preparePath(path)
	var nwritten size
	errno := path_readlink(
		dirFd,
		pathPtr,
		pathLen,
		&buf[0],
		size(len(buf)),
		&nwritten,
	)
	// For some reason wasmtime returns ERANGE when the output buffer is
	// shorter than the symbolic link value. os.Readlink expects a nil
	// error and uses the fact that n is greater or equal to the buffer
	// length to assume that it needs to try again with a larger size.
	// This condition is handled in os.Readlink.
	return int(nwritten), errnoErr(errno)
}

func Link(path, link string) error {
	if path == "" || link == "" {
		return EINVAL
	}
	oldDirFd, oldPathPtr, oldPathLen := preparePath(path)
	newDirFd, newPathPtr, newPathLen := preparePath(link)
	errno := path_link(
		oldDirFd,
		0,
		oldPathPtr,
		oldPathLen,
		newDirFd,
		newPathPtr,
		newPathLen,
	)
	return errnoErr(errno)
}

func Symlink(path, link string) error {
	if path == "" || link == "" {
		return EINVAL
	}
	dirFd, pathPtr, pathlen := preparePath(link)
	errno := path_symlink(
		unsafe.StringData(path),
		size(len(path)),
		dirFd,
		pathPtr,
		pathlen,
	)
	return errnoErr(errno)
}

func Fsync(fd int) error {
	errno := fd_sync(int32(fd))
	return errnoErr(errno)
}

func makeIOVec(b []byte) *iovec {
	return &iovec{
		buf:    uintptr32(uintptr(unsafe.Pointer(unsafe.SliceData(b)))),
		bufLen: size(len(b)),
	}
}

func Read(fd int, b []byte) (int, error) {
	var nread size
	errno := fd_read(int32(fd), makeIOVec(b), 1, &nread)
	runtime.KeepAlive(b)
	return int(nread), errnoErr(errno)
}

func Write(fd int, b []byte) (int, error) {
	var nwritten size
	errno := fd_write(int32(fd), makeIOVec(b), 1, &nwritten)
	runtime.KeepAlive(b)
	return int(nwritten), errnoErr(errno)
}

func Pread(fd int, b []byte, offset int64) (int, error) {
	var nread size
	errno := fd_pread(int32(fd), makeIOVec(b), 1, filesize(offset), &nread)
	runtime.KeepAlive(b)
	return int(nread), errnoErr(errno)
}

func Pwrite(fd int, b []byte, offset int64) (int, error) {
	var nwritten size
	errno := fd_pwrite(int32(fd), makeIOVec(b), 1, filesize(offset), &nwritten)
	runtime.KeepAlive(b)
	return int(nwritten), errnoErr(errno)
}

func Seek(fd int, offset int64, whence int) (int64, error) {
	var newoffset filesize
	errno := fd_seek(int32(fd), filedelta(offset), uint32(whence), &newoffset)
	return int64(newoffset), errnoErr(errno)
}

func Dup(fd int) (int, error) {
	return 0, ENOSYS
}

func Dup2(fd, newfd int) error {
	return ENOSYS
}

func Pipe(fd []int) error {
	return ENOSYS
}

func RandomGet(b []byte) error {
	errno := random_get(unsafe.SliceData(b), size(len(b)))
	return errnoErr(errno)
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
js
--
16 Dec 2025 9.30 PM
root / root
0755
asm9_unix2_amd64.s
1.188 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_aix_ppc64.s
0.527 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_darwin_amd64.s
2.931 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_darwin_arm64.s
2.829 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_freebsd_arm.s
2.96 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_freebsd_arm64.s
2.795 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_freebsd_riscv64.s
2.764 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_386.s
3.084 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_amd64.s
1.327 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_arm.s
1.766 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_arm64.s
0.895 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_loong64.s
0.925 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_mips64x.s
0.962 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_mipsx.s
1.746 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_ppc64x.s
0.892 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_riscv64.s
0.841 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_linux_s390x.s
2.151 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_netbsd_arm.s
2.849 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_netbsd_arm64.s
2.885 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_386.s
1.038 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_amd64.s
1.041 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_arm.s
1.038 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_arm64.s
1.041 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_mips64.s
2.846 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_ppc64.s
1.041 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_openbsd_riscv64.s
1.043 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_plan9_386.s
3.141 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_plan9_amd64.s
3.355 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_plan9_arm.s
3.249 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_solaris_amd64.s
1.802 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_unix_386.s
2.735 KB
4 Dec 2025 6.06 PM
root / root
0644
asm_unix_amd64.s
2.15 KB
4 Dec 2025 6.06 PM
root / root
0644
badlinkname_unix.go
0.591 KB
4 Dec 2025 6.06 PM
root / root
0644
bpf_bsd.go
4.034 KB
4 Dec 2025 6.06 PM
root / root
0644
const_plan9.go
1.359 KB
4 Dec 2025 6.06 PM
root / root
0644
dir_plan9.go
5.242 KB
4 Dec 2025 6.06 PM
root / root
0644
dirent.go
2.407 KB
4 Dec 2025 6.06 PM
root / root
0644
dll_windows.go
7.733 KB
4 Dec 2025 6.06 PM
root / root
0644
env_unix.go
2.579 KB
4 Dec 2025 6.06 PM
root / root
0644
env_windows.go
1.964 KB
4 Dec 2025 6.06 PM
root / root
0644
errors_plan9.go
1.609 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_bsd.go
8.097 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_freebsd.go
8.58 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_libc.go
8.314 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_libc2.go
8.337 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_linux.go
27.037 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_plan9.go
13.262 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_unix.go
8.732 KB
4 Dec 2025 6.06 PM
root / root
0644
exec_windows.go
10.211 KB
4 Dec 2025 6.06 PM
root / root
0644
flock_aix.go
0.557 KB
4 Dec 2025 6.06 PM
root / root
0644
flock_bsd.go
0.464 KB
4 Dec 2025 6.06 PM
root / root
0644
flock_linux.go
0.632 KB
4 Dec 2025 6.06 PM
root / root
0644
flock_linux_32bit.go
0.411 KB
4 Dec 2025 6.06 PM
root / root
0644
forkpipe.go
0.59 KB
4 Dec 2025 6.06 PM
root / root
0644
forkpipe2.go
2.604 KB
4 Dec 2025 6.06 PM
root / root
0644
fs_js.go
11.322 KB
4 Dec 2025 6.06 PM
root / root
0644
fs_wasip1.go
24.118 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_bsd.go
0.416 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_darwin.go
0.457 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_libc.go
0.296 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_openbsd.go
0.318 KB
4 Dec 2025 6.06 PM
root / root
0644
linkname_unix.go
0.52 KB
4 Dec 2025 6.06 PM
root / root
0644
lsf_linux.go
2.123 KB
4 Dec 2025 6.06 PM
root / root
0644
mkall.sh
14.594 KB
4 Dec 2025 6.06 PM
root / root
0755
mkasm.go
1.885 KB
4 Dec 2025 6.06 PM
root / root
0644
mkerrors.sh
10.711 KB
4 Dec 2025 6.06 PM
root / root
0755
mkpost.go
2.279 KB
4 Dec 2025 6.06 PM
root / root
0644
mksyscall.pl
10.272 KB
4 Dec 2025 6.06 PM
root / root
0755
mksyscall_libc.pl
8.016 KB
4 Dec 2025 6.06 PM
root / root
0755
mksyscall_windows.go
1.988 KB
4 Dec 2025 6.06 PM
root / root
0644
mksysctl_openbsd.pl
5.039 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_dragonfly.pl
0.846 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_freebsd.pl
1.348 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_linux.pl
1.262 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_netbsd.pl
1.011 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_openbsd.pl
0.852 KB
4 Dec 2025 6.06 PM
root / root
0755
mksysnum_plan9.sh
0.448 KB
4 Dec 2025 6.06 PM
root / root
0755
net.go
1.193 KB
4 Dec 2025 6.06 PM
root / root
0644
net_fake.go
0.862 KB
4 Dec 2025 6.06 PM
root / root
0644
net_js.go
1.384 KB
4 Dec 2025 6.06 PM
root / root
0644
net_wasip1.go
1.776 KB
4 Dec 2025 6.06 PM
root / root
0644
netlink_linux.go
4.771 KB
4 Dec 2025 6.06 PM
root / root
0644
os_wasip1.go
0.246 KB
4 Dec 2025 6.06 PM
root / root
0644
pwd_plan9.go
2.271 KB
4 Dec 2025 6.06 PM
root / root
0644
rlimit.go
1.904 KB
4 Dec 2025 6.06 PM
root / root
0644
rlimit_darwin.go
0.579 KB
4 Dec 2025 6.06 PM
root / root
0644
rlimit_stub.go
0.33 KB
4 Dec 2025 6.06 PM
root / root
0644
route_bsd.go
9.104 KB
4 Dec 2025 6.06 PM
root / root
0644
route_darwin.go
2.01 KB
4 Dec 2025 6.06 PM
root / root
0644
route_dragonfly.go
2.613 KB
4 Dec 2025 6.06 PM
root / root
0644
route_freebsd.go
2.673 KB
4 Dec 2025 6.06 PM
root / root
0644
route_freebsd_32bit.go
1.14 KB
4 Dec 2025 6.06 PM
root / root
0644
route_freebsd_64bit.go
0.744 KB
4 Dec 2025 6.06 PM
root / root
0644
route_netbsd.go
1.429 KB
4 Dec 2025 6.06 PM
root / root
0644
route_openbsd.go
1.457 KB
4 Dec 2025 6.06 PM
root / root
0644
security_windows.go
10.011 KB
4 Dec 2025 6.06 PM
root / root
0644
setuidgid_32_linux.go
0.425 KB
4 Dec 2025 6.06 PM
root / root
0644
setuidgid_linux.go
0.411 KB
4 Dec 2025 6.06 PM
root / root
0644
sockcmsg_dragonfly.go
0.534 KB
4 Dec 2025 6.06 PM
root / root
0644
sockcmsg_linux.go
1.119 KB
4 Dec 2025 6.06 PM
root / root
0644
sockcmsg_unix.go
2.509 KB
4 Dec 2025 6.06 PM
root / root
0644
sockcmsg_unix_other.go
1.085 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall.go
3.781 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_aix.go
17.948 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_aix_ppc64.go
0.396 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_bsd.go
13.63 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_darwin.go
10.971 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_darwin_amd64.go
1.906 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_darwin_arm64.go
1.822 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_dragonfly.go
8.55 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_dragonfly_amd64.go
1.117 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd.go
8.723 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd_386.go
1.438 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd_amd64.go
1.117 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd_arm.go
1.158 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd_arm64.go
1.117 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_freebsd_riscv64.go
1.117 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_illumos.go
0.599 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_js.go
6.752 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux.go
36.403 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_386.go
8.586 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_amd64.go
4.455 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_arm.go
5.302 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_arm64.go
5.313 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_loong64.go
6.619 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_mips64x.go
5.925 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_mipsx.go
5.099 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_ppc64x.go
4.29 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_riscv64.go
5.45 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_linux_s390x.go
7.581 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_netbsd.go
7.783 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_netbsd_386.go
0.699 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_netbsd_amd64.go
0.692 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_netbsd_arm.go
0.699 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_netbsd_arm64.go
0.692 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd.go
6.968 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd1.go
0.521 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_386.go
0.698 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_amd64.go
0.685 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_arm.go
0.698 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_arm64.go
0.885 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_libc.go
3.611 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_mips64.go
0.947 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_ppc64.go
0.885 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_openbsd_riscv64.go
0.885 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_plan9.go
9.372 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_solaris.go
15.664 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_solaris_amd64.go
0.476 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_solarisonly.go
0.297 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_unix.go
12.238 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_wasip1.go
9.408 KB
4 Dec 2025 6.06 PM
root / root
0644
syscall_windows.go
55.782 KB
4 Dec 2025 6.06 PM
root / root
0644
tables_js.go
19.175 KB
4 Dec 2025 6.06 PM
root / root
0644
tables_wasip1.go
6.569 KB
4 Dec 2025 6.06 PM
root / root
0644
time_fake.go
0.661 KB
4 Dec 2025 6.06 PM
root / root
0644
time_nofake.go
0.343 KB
4 Dec 2025 6.06 PM
root / root
0644
timestruct.go
0.936 KB
4 Dec 2025 6.06 PM
root / root
0644
types_aix.go
3.352 KB
4 Dec 2025 6.06 PM
root / root
0644
types_darwin.go
5.033 KB
4 Dec 2025 6.06 PM
root / root
0644
types_dragonfly.go
5.046 KB
4 Dec 2025 6.06 PM
root / root
0644
types_freebsd.go
6.722 KB
4 Dec 2025 6.06 PM
root / root
0644
types_illumos_amd64.go
0.37 KB
4 Dec 2025 6.06 PM
root / root
0644
types_linux.go
10.904 KB
4 Dec 2025 6.06 PM
root / root
0644
types_netbsd.go
4.768 KB
4 Dec 2025 6.06 PM
root / root
0644
types_openbsd.go
5.039 KB
4 Dec 2025 6.06 PM
root / root
0644
types_solaris.go
4.879 KB
4 Dec 2025 6.06 PM
root / root
0644
types_windows.go
28.503 KB
4 Dec 2025 6.06 PM
root / root
0644
types_windows_386.go
0.466 KB
4 Dec 2025 6.06 PM
root / root
0644
types_windows_amd64.go
0.466 KB
4 Dec 2025 6.06 PM
root / root
0644
types_windows_arm.go
0.466 KB
4 Dec 2025 6.06 PM
root / root
0644
types_windows_arm64.go
0.466 KB
4 Dec 2025 6.06 PM
root / root
0644
wtf8_windows.go
2.672 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_aix_ppc64.go
47.156 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_darwin_amd64.go
55.262 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_darwin_arm64.go
55.77 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_dragonfly_amd64.go
59.601 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_freebsd_386.go
67.339 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_freebsd_amd64.go
67.383 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_freebsd_arm.go
67.329 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_freebsd_arm64.go
67.383 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_freebsd_riscv64.go
67.383 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_386.go
57.338 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_amd64.go
57.375 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_arm.go
57.862 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_arm64.go
68.552 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_loong64.go
82.466 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_mips.go
69.192 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_mips64.go
68.512 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_mips64le.go
68.512 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_mipsle.go
69.192 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_ppc64.go
70.867 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_ppc64le.go
71.827 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_riscv64.go
70.814 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_linux_s390x.go
73.289 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_netbsd_386.go
67.463 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_netbsd_amd64.go
67.053 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_netbsd_arm.go
66.477 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_netbsd_arm64.go
67.053 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_386.go
62.732 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_amd64.go
62.688 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_arm.go
62.679 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_arm64.go
66.359 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_mips64.go
66.66 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_ppc64.go
67.14 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_openbsd_riscv64.go
67.101 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_solaris_amd64.go
50.742 KB
4 Dec 2025 6.06 PM
root / root
0644
zerrors_windows.go
9.967 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_aix_ppc64.go
41.748 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_darwin_amd64.go
51.716 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_darwin_amd64.s
8.698 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_darwin_arm64.go
51.669 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_darwin_arm64.s
8.675 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_dragonfly_amd64.go
31.669 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_freebsd_386.go
31.21 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_freebsd_amd64.go
31.066 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_freebsd_arm.go
31.234 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_freebsd_arm64.go
31.066 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_freebsd_riscv64.go
31.072 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_386.go
34.16 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_amd64.go
38.979 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_arm.go
38.068 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_arm64.go
37.294 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_loong64.go
37.083 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_mips.go
39.819 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_mips64.go
39.837 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_mips64le.go
39.841 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_mipsle.go
39.823 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_ppc64.go
40.468 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_ppc64le.go
40.472 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_riscv64.go
37.325 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_linux_s390x.go
34.788 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_netbsd_386.go
30.11 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_netbsd_amd64.go
29.966 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_netbsd_arm.go
30.115 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_netbsd_arm64.go
29.966 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_386.go
47.133 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_386.s
7.947 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_amd64.go
46.991 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_amd64.s
7.949 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_arm.go
47.157 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_arm.s
7.947 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_arm64.go
46.991 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_arm64.s
7.949 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_mips64.go
30.049 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_ppc64.go
46.991 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_ppc64.s
8.629 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_riscv64.go
46.997 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_openbsd_riscv64.s
7.951 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_plan9_386.go
6.172 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_plan9_amd64.go
6.176 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_plan9_arm.go
6.172 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_solaris_amd64.go
37.563 KB
4 Dec 2025 6.06 PM
root / root
0644
zsyscall_windows.go
57.064 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysctl_openbsd.go
11.389 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_darwin_amd64.go
14.524 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_darwin_arm64.go
14.361 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_dragonfly_amd64.go
22.913 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_freebsd_386.go
25.433 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_freebsd_amd64.go
25.433 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_freebsd_arm.go
25.433 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_freebsd_arm64.go
35.759 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_freebsd_riscv64.go
35.759 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_386.go
11.243 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_amd64.go
10.081 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_arm.go
11.527 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_arm64.go
8.923 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_loong64.go
10.282 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_mips.go
12.103 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_mips64.go
10.926 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_mips64le.go
10.926 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_mipsle.go
12.103 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_ppc64.go
11.439 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_ppc64le.go
11.461 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_riscv64.go
8.884 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_linux_s390x.go
10.642 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_netbsd_386.go
25.665 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_netbsd_amd64.go
25.665 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_netbsd_arm.go
25.665 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_netbsd_arm64.go
25.665 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_386.go
14.13 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_amd64.go
14.13 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_arm.go
14.433 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_arm64.go
14.725 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_mips64.go
14.93 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_ppc64.go
15.829 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_openbsd_riscv64.go
15.675 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_plan9.go
1.028 KB
4 Dec 2025 6.06 PM
root / root
0644
zsysnum_solaris_amd64.go
0.258 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_aix_ppc64.go
4.17 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_darwin_amd64.go
6.949 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_darwin_arm64.go
6.949 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_dragonfly_amd64.go
6.701 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_freebsd_386.go
7.976 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_freebsd_amd64.go
7.997 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_freebsd_arm.go
8.005 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_freebsd_arm64.go
7.997 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_freebsd_riscv64.go
7.997 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_386.go
11.59 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_amd64.go
11.953 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_arm.go
11.479 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_arm64.go
10.143 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_loong64.go
10.769 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_mips.go
9.991 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_mips64.go
10.114 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_mips64le.go
10.114 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_mipsle.go
9.991 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_ppc64.go
10.248 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_ppc64le.go
10.381 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_riscv64.go
10.263 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_linux_s390x.go
10.453 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_netbsd_386.go
5.992 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_netbsd_amd64.go
6.172 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_netbsd_arm.go
6.134 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_netbsd_arm64.go
6.172 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_386.go
6.733 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_amd64.go
6.889 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_arm.go
6.836 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_arm64.go
6.658 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_mips64.go
6.658 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_ppc64.go
6.692 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_openbsd_riscv64.go
6.692 KB
4 Dec 2025 6.06 PM
root / root
0644
ztypes_solaris_amd64.go
5.566 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF