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
- func DirFS(dir string) experimentalsys.FS
- func NewStdioFile(stdin bool, f fs.File) (fsapi.File, error)
- func NewTCPListenerFile(tl *net.TCPListener) socketapi.TCPSock
- func OpenFSFile(fs fs.FS, path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
- func OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (*os.File, experimentalsys.Errno)
- func OpenOSFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
- type AdaptFS
- func (a *AdaptFS) Chmod(string, fs.FileMode) experimentalsys.Errno
- func (a *AdaptFS) Link(string, string) experimentalsys.Errno
- func (a *AdaptFS) Lstat(path string) (sys.Stat_t, experimentalsys.Errno)
- func (a *AdaptFS) Mkdir(string, fs.FileMode) experimentalsys.Errno
- func (a *AdaptFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
- func (a *AdaptFS) Readlink(string) (string, experimentalsys.Errno)
- func (a *AdaptFS) Rename(string, string) experimentalsys.Errno
- func (a *AdaptFS) Rmdir(string) experimentalsys.Errno
- func (a *AdaptFS) Stat(path string) (sys.Stat_t, experimentalsys.Errno)
- func (a *AdaptFS) String() string
- func (a *AdaptFS) Symlink(string, string) experimentalsys.Errno
- func (a *AdaptFS) Unlink(string) experimentalsys.Errno
- func (a *AdaptFS) Utimens(string, int64, int64) experimentalsys.Errno
- type ReadFS
- func (r *ReadFS) Chmod(path string, perm fs.FileMode) experimentalsys.Errno
- func (r *ReadFS) Link(_, _ string) experimentalsys.Errno
- func (r *ReadFS) Mkdir(path string, perm fs.FileMode) experimentalsys.Errno
- func (r *ReadFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
- func (r *ReadFS) Rename(from, to string) experimentalsys.Errno
- func (r *ReadFS) Rmdir(path string) experimentalsys.Errno
- func (r *ReadFS) Symlink(_, _ string) experimentalsys.Errno
- func (r *ReadFS) Unlink(path string) experimentalsys.Errno
- func (r *ReadFS) Utimens(path string, atim, mtim int64) experimentalsys.Errno
Constants ¶
const MSG_PEEK = syscall.MSG_PEEK
MSG_PEEK is the constant syscall.MSG_PEEK
Variables ¶
This section is empty.
Functions ¶
func DirFS ¶
func DirFS(dir string) experimentalsys.FS
func NewTCPListenerFile ¶
func NewTCPListenerFile(tl *net.TCPListener) socketapi.TCPSock
NewTCPListenerFile creates a socketapi.TCPSock for a given *net.TCPListener.
func OpenFSFile ¶
func OpenFSFile(fs fs.FS, path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
func OpenFile ¶
func OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (*os.File, experimentalsys.Errno)
func OpenOSFile ¶
func OpenOSFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
Types ¶
type AdaptFS ¶
func (*AdaptFS) Link ¶
func (a *AdaptFS) Link(string, string) experimentalsys.Errno
Link implements the same method as documented on sys.FS
func (*AdaptFS) OpenFile ¶
func (a *AdaptFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
OpenFile implements the same method as documented on sys.FS
func (*AdaptFS) Readlink ¶
func (a *AdaptFS) Readlink(string) (string, experimentalsys.Errno)
Readlink implements the same method as documented on sys.FS
func (*AdaptFS) Rename ¶
func (a *AdaptFS) Rename(string, string) experimentalsys.Errno
Rename implements the same method as documented on sys.FS
func (*AdaptFS) Rmdir ¶
func (a *AdaptFS) Rmdir(string) experimentalsys.Errno
Rmdir implements the same method as documented on sys.FS
func (*AdaptFS) Symlink ¶
func (a *AdaptFS) Symlink(string, string) experimentalsys.Errno
Symlink implements the same method as documented on sys.FS
type ReadFS ¶
type ReadFS struct {
experimentalsys.FS
}
func (*ReadFS) Link ¶
func (r *ReadFS) Link(_, _ string) experimentalsys.Errno
Link implements the same method as documented on sys.FS
func (*ReadFS) OpenFile ¶
func (r *ReadFS) OpenFile(path string, flag experimentalsys.Oflag, perm fs.FileMode) (experimentalsys.File, experimentalsys.Errno)
OpenFile implements the same method as documented on sys.FS
func (*ReadFS) Rename ¶
func (r *ReadFS) Rename(from, to string) experimentalsys.Errno
Rename implements the same method as documented on sys.FS
func (*ReadFS) Rmdir ¶
func (r *ReadFS) Rmdir(path string) experimentalsys.Errno
Rmdir implements the same method as documented on sys.FS
func (*ReadFS) Symlink ¶
func (r *ReadFS) Symlink(_, _ string) experimentalsys.Errno
Symlink implements the same method as documented on sys.FS