operating

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

Functions

func OpenFileWrite

func OpenFileWrite(name string, flag int, perm os.FileMode) (io.WriteCloser, error)

Types

type ReadCloserAt

type ReadCloserAt interface {
	io.ReadCloser
	io.ReaderAt
}

func OpenFileRead

func OpenFileRead(name string, flag int, perm os.FileMode) (ReadCloserAt, error)

type SystemFunctions

type SystemFunctions struct {
	Chmod         func(name string, mode os.FileMode) error
	CurrentUser   func() (*user.User, error)
	Getenv        func(key string) string
	Getpid        func() int
	Glob          func(pattern string) (matches []string, err error)
	Hostname      func() (string, error)
	IsNotExist    func(err error) bool
	MkdirAll      func(path string, perm os.FileMode) error
	Now           func() time.Time
	OpenFileRead  func(name string, flag int, perm os.FileMode) (ReadCloserAt, error)
	OpenFileWrite func(name string, flag int, perm os.FileMode) (io.WriteCloser, error)
	ReadFile      func(filename string) ([]byte, error)
	Remove        func(name string) error
	RemoveAll     func(name string) error
	Stat          func(name string) (os.FileInfo, error)
	Stdin         ReadCloserAt
	Stdout        io.WriteCloser
	TempFile      func(dir, pattern string) (f *os.File, err error)
	Local         *time.Location
}

func InitializeSystemFunctions

func InitializeSystemFunctions() *SystemFunctions

Jump to

Keyboard shortcuts

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