os

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	O_RDONLY = os.O_RDONLY
	O_WRONLY = os.O_WRONLY
	O_RDWR   = os.O_RDWR
	O_APPEND = os.O_APPEND
	O_CREATE = os.O_CREATE
	O_EXCL   = os.O_EXCL
	O_SYNC   = os.O_SYNC
	O_TRUNC  = os.O_TRUNC

	DevNull = os.DevNull

	ModeAppend     = os.ModeAppend
	ModeCharDevice = os.ModeCharDevice
	ModeDevice     = os.ModeDevice
	ModeDir        = os.ModeDir
	ModeExclusive  = os.ModeExclusive
	ModeIrregular  = os.ModeIrregular
	ModeNamedPipe  = os.ModeNamedPipe
	ModePerm       = os.ModePerm
	ModeSetgid     = os.ModeSetgid
	ModeSetuid     = os.ModeSetuid
	ModeSocket     = os.ModeSocket
	ModeSticky     = os.ModeSticky
	ModeSymlink    = os.ModeSymlink
	ModeTemporary  = os.ModeTemporary
	ModeType       = os.ModeType
)

Variables

View Source
var (
	Args = os.Args

	ErrClosed           = os.ErrClosed
	ErrDeadlineExceeded = os.ErrDeadlineExceeded
	ErrExist            = os.ErrExist
	ErrInvalid          = os.ErrInvalid
	ErrNoDeadline       = os.ErrNoDeadline
	ErrNotExist         = os.ErrNotExist
	ErrPermission       = os.ErrPermission
	ErrProcessDone      = os.ErrProcessDone

	Interrupt = os.Interrupt

	NewFile         = os.NewFile
	NewSyscallError = os.NewSyscallError
)
View Source
var System = sys{}

Functions

func WithContext

func WithContext(parent context.Context, val Os) context.Context

Types

type DirEntry

type DirEntry = os.DirEntry

type File

type File = os.File

type FileInfo

type FileInfo = os.FileInfo

type FileMode

type FileMode = os.FileMode

type LinkError

type LinkError = os.LinkError

type Os

type Os interface {
	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
	Clearenv()
	CopyFS(dir string, fsys fs.FS) error
	DirFS(dir string) fs.FS
	Environ() []string
	Executable() (string, error)
	Exit(code int)
	Expand(s string, mapping func(string) string) string
	ExpandEnv(s string) string
	Getegid() int
	Getenv(key string) string
	Geteuid() int
	Getgid() int
	Getgroups() ([]int, error)
	Getpagesize() int
	Getpid() int
	Getppid() int
	Getuid() int
	Getwd() (string, error)
	Hostname() (name string, err error)
	Lchown(name string, uid, gid int) error
	Link(oldname, newname string) error
	LookupEnv(key string) (string, bool)
	Mkdir(name string, mode FileMode) error
	MkdirAll(path string, mode FileMode) error
	MkdirTemp(dir, pattern string) (string, error)
	Stderr() io.Writer
	Stdin() io.Reader
	Stdout() io.Writer
	TempDir() string
}

func FromContext

func FromContext(ctx context.Context) Os

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 SyscallError

type SyscallError = os.SyscallError

Jump to

Keyboard shortcuts

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