sysfs

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package sysfs includes a low-level filesystem interface and utilities needed for WebAssembly host functions (ABI) such as WASI and runtime.GOOS=js.

The name sysfs was chosen because wazero's public API has a "sys" package, which was named after https://github.com/golang/sys.

Index

Constants

View Source
const MSG_PEEK = syscall.MSG_PEEK

MSG_PEEK is the constant syscall.MSG_PEEK

Variables

This section is empty.

Functions

func DirFS added in v1.4.0

func DirFS(dir string) experimentalsys.FS

func NewStdioFile added in v1.2.0

func NewStdioFile(stdin bool, f fs.File) (fsapi.File, error)

func NewTCPListenerFile added in v1.2.0

func NewTCPListenerFile(tl *net.TCPListener) socketapi.TCPSock

NewTCPListenerFile creates a socketapi.TCPSock for a given *net.TCPListener.

func OpenFSFile added in v1.2.0

func OpenFSFile(fs fs.FS, path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)

func OpenFile added in v1.2.0

func OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (*os.File, experimentalsys.Errno)

func OpenOSFile added in v1.2.0

Types

type AdaptFS added in v1.4.0

type AdaptFS struct {
	FS fs.FS
}

func (*AdaptFS) Chmod added in v1.4.0

Chmod implements the same method as documented on sys.FS

Link implements the same method as documented on sys.FS

func (*AdaptFS) Lstat added in v1.4.0

func (a *AdaptFS) Lstat(path string) (sys.Stat_t, experimentalsys.Errno)

Lstat implements the same method as documented on sys.FS

func (*AdaptFS) Mkdir added in v1.4.0

Mkdir implements the same method as documented on sys.FS

func (*AdaptFS) OpenFile added in v1.4.0

OpenFile implements the same method as documented on sys.FS

func (a *AdaptFS) Readlink(string) (string, experimentalsys.Errno)

Readlink implements the same method as documented on sys.FS

func (*AdaptFS) Rename added in v1.4.0

Rename implements the same method as documented on sys.FS

func (*AdaptFS) Rmdir added in v1.4.0

func (a *AdaptFS) Rmdir(string) experimentalsys.Errno

Rmdir implements the same method as documented on sys.FS

func (*AdaptFS) Stat added in v1.4.0

func (a *AdaptFS) Stat(path string) (sys.Stat_t, experimentalsys.Errno)

Stat implements the same method as documented on sys.FS

func (*AdaptFS) String added in v1.4.0

func (a *AdaptFS) String() string

String implements fmt.Stringer

func (a *AdaptFS) Symlink(string, string) experimentalsys.Errno

Symlink implements the same method as documented on sys.FS

func (a *AdaptFS) Unlink(string) experimentalsys.Errno

Unlink implements the same method as documented on sys.FS

func (*AdaptFS) Utimens added in v1.4.0

Utimens implements the same method as documented on sys.FS

type ReadFS added in v1.4.0

type ReadFS struct {
	experimentalsys.FS
}

func (*ReadFS) Chmod added in v1.4.0

func (r *ReadFS) Chmod(path string, perm fs.FileMode) experimentalsys.Errno

Chmod implements the same method as documented on sys.FS

func (r *ReadFS) Link(_, _ string) experimentalsys.Errno

Link implements the same method as documented on sys.FS

func (*ReadFS) Mkdir added in v1.4.0

func (r *ReadFS) Mkdir(path string, perm fs.FileMode) experimentalsys.Errno

Mkdir implements the same method as documented on sys.FS

func (*ReadFS) OpenFile added in v1.4.0

OpenFile implements the same method as documented on sys.FS

func (*ReadFS) Rename added in v1.4.0

func (r *ReadFS) Rename(from, to string) experimentalsys.Errno

Rename implements the same method as documented on sys.FS

func (*ReadFS) Rmdir added in v1.4.0

func (r *ReadFS) Rmdir(path string) experimentalsys.Errno

Rmdir implements the same method as documented on sys.FS

func (r *ReadFS) Symlink(_, _ string) experimentalsys.Errno

Symlink implements the same method as documented on sys.FS

func (r *ReadFS) Unlink(path string) experimentalsys.Errno

Unlink implements the same method as documented on sys.FS

func (*ReadFS) Utimens added in v1.4.0

func (r *ReadFS) Utimens(path string, atim, mtim int64) experimentalsys.Errno

Utimens implements the same method as documented on sys.FS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL