os

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var System = sys{}

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	Args() []string
	Executable() (string, error)
	Exit(code int)
	Getwd() (string, error)
}

type DirEntry

type DirEntry = os.DirEntry

type Env

type Env interface {
	Clearenv()
	Environ() []string
	Expand(s string, mapping func(string) string) string
	ExpandEnv(s string) string
	Getenv(key string) string
	IsPathSeparator(c uint8) bool
	LookupEnv(key string) (string, bool)
	Setenv(key, value string) error
	TempDir() string
	Unsetenv(key string) error
	UserCacheDir() (string, error)
	UserConfigDir() (string, error)
	UserHomeDir() (string, error)
}

type File

type FileInfo

type FileInfo = os.FileInfo

type FileMode

type FileMode = os.FileMode

type Fs

type Fs interface {
	CopyFS(dir string, fsys fs.FS) error
	Chdir(dir string) error
	Chmod(name string, mode FileMode) error
	Chown(name string, uid, gid int) error
	Chtimes(name string, atime, mtime time.Time) error
	Create(name string) (File, error)
	CreateTemp(dir, pattern string) (File, error)
	DirFS(dir string) fs.FS
	Lchown(name string, uid, gid int) error
	Link(oldname, newname string) error
	Lstat(name string) (FileInfo, error)
	Mkdir(name string, mode FileMode) error
	MkdirAll(path string, mode FileMode) error
	MkdirTemp(dir, pattern string) (string, error)
	Open(name string) (File, error)
	OpenFile(name string, flag int, perm FileMode) (File, error)
	OpenInRoot(dir, name string) (File, error)
	OpenRoot(name string) (*Root, error)
	ReadDir(name string) ([]DirEntry, error)
	ReadFile(name string) ([]byte, error)
	Readlink(name string) (string, error)
	Remove(name string) error
	RemoveAll(path string) error
	Rename(oldpath, newpath string) error
	SameFile(fi1, fi2 FileInfo) bool
	Stat(name string) (FileInfo, error)
	Symlink(oldname, newname string) error
	Truncate(name string, size int64) error
	WriteFile(name string, data []byte, perm FileMode) error
}

type Id

type Id interface {
	Getegid() int
	Geteuid() int
	Getgid() int
	Getgroups() ([]int, error)
	Getuid() int
}

type LinkError

type LinkError = os.LinkError

type Net

type Net interface {
	Hostname() (name string, err error)
}

type OsFile

type OsFile = os.File

type PathError

type PathError = os.PathError

type ProcAttr

type ProcAttr = os.ProcAttr

type Process

type Process = os.Process

type ProcessState

type ProcessState = os.ProcessState

type Root

type Root = os.Root

type Signal

type Signal = os.Signal

type Stdio

type Stdio interface {
	Stderr() io.Writer
	Stdin() io.Reader
	Stdout() io.Writer
	Pipe() (r io.Reader, w io.Writer, err error)
}

type Sys

type Sys interface {
	Getpagesize() int
	Getpid() int
	Getppid() int
}

type SyscallError

type SyscallError = os.SyscallError

Jump to

Keyboard shortcuts

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