os

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const FILE_SIZE int = 2000000
View Source
const O_CLOSEXEC int = 524288 // 0x80000
View Source
const O_CREATE int = 64 // 0x40
View Source
const O_RDWR int = 2
View Source
const O_READONLY int = 0
View Source
const O_TRUNC int = 512 // 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 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)

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)

Jump to

Keyboard shortcuts

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