os

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const FILE_SIZE int = 2000000
View Source
const O_CLOSEXEC int = 0x80000
View Source
const O_CREATE int = 0x40
View Source
const O_RDWR int = 0x2
View Source
const O_READONLY int = 0
View Source
const O_TRUNC int = 0x200
View Source
const SYS_EXIT int = 60

Variables

View Source
var Args []string

Functions

func Cstring2string added in v0.0.4

func Cstring2string(b *byte) string

func Environ added in v0.2.0

func Environ() []string

func Exit

func Exit(status int)

func Getenv

func Getenv(key string) string

func ReadFile added in v0.0.4

func ReadFile(filename string) ([]uint8, error)

func StartProcess added in v0.3.0

func StartProcess(path string, args []string, attr unsafe.Pointer) (uintptr, error)

Types

type File added in v0.0.3

type File struct {
	// contains filtered or unexported fields
}
var Stderr *File = &File{
	fd: 2,
}
var Stdin *File = &File{
	fd: 0,
}
var Stdout *File = &File{
	fd: 1,
}

func Create added in v0.0.3

func Create(name string) (*File, error)

func Open added in v0.0.4

func Open(name string) (*File, error)

func (*File) Close added in v0.0.3

func (f *File) Close() error

func (*File) Fd added in v0.0.4

func (f *File) Fd() uintptr

func (*File) Readdirnames added in v0.0.4

func (f *File) Readdirnames(n int) ([]string, error)

func (*File) Write added in v0.0.3

func (f *File) Write(p []byte) (int, error)

type PathError added in v0.2.0

type PathError struct {
	Err string
}

func (*PathError) Error added in v0.2.0

func (e *PathError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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