os

package
v0.0.0-...-5ab7420 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const O_RDONLY = 0

Variables

View Source
var Args []string

Functions

func Exit

func Exit(code int)

func Getenv

func Getenv(key string) string

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File represents an open file descriptor.

var Stderr *File = &File{
	pfd: &sfd2,
}
var Stdout *File = &File{
	pfd: &sfd1,
}

func Open

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

func OpenFile

func OpenFile(name string, flag int, perm int) (*File, error)

func (*File) Fd

func (f *File) Fd() int

func (*File) Read

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

Read reads up to len(b) bytes from the File.

func (*File) Readdirnames

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

func (*File) Write

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

Write writes len(b) bytes to the File.

type PollFD

type PollFD struct {
	Sysfd int
}

func (*PollFD) Read

func (fd *PollFD) Read(b []byte) (int, error)

func (*PollFD) ReadDirent

func (fd *PollFD) ReadDirent(buf []byte) (int, error)

func (*PollFD) Write

func (fd *PollFD) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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