Documentation
¶
Index ¶
- Constants
- func Close(fd int) (err error)
- func Exit(code int)
- func Getegid() int
- func Getenv(key string) (value string, found bool)
- func Geteuid() int
- func Getgid() int
- func Getpid() int
- func Getppid() int
- func Getuid() int
- func Getwd() (string, error)
- func Kill(pid int, sig Signal) (err error)
- func Mkdir(path string, mode uint32) (err error)
- func Open(path string, flag int, mode uint32) (fd int, err error)
- func Read(fd int, p []byte) (n int, err error)
- func Seek(fd int, offset int64, whence int) (off int64, err error)
- func Unlink(path string) (err error)
- func Write(fd int, p []byte) (n int, err error)
- type Conn
- type Errno
- type RawConn
- type Signal
Constants ¶
View Source
const ( Stdin = 0 Stdout = 1 Stderr = 2 )
View Source
const ( O_RDONLY = 0x0 O_WRONLY = 0x1 O_RDWR = 0x2 O_APPEND = 0x8 O_SYNC = 0x80 O_CREAT = 0x200 O_TRUNC = 0x400 O_EXCL = 0x800 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶ added in v0.14.0
type Conn interface { // SyscallConn returns a raw network connection. SyscallConn() (RawConn, error) }
Conn is implemented by some types in the net and os packages to provide access to the underlying file descriptor or handle.
type Errno ¶
type Errno uintptr
An Errno is an unsigned number describing an error condition. It implements the error interface. The zero Errno is by convention a non-error, so code to convert from Errno to error should use:
err = nil if errno != 0 { err = errno }
type RawConn ¶ added in v0.14.0
type RawConn interface { // Control invokes f on the underlying connection's file // descriptor or handle. // The file descriptor fd is guaranteed to remain valid while // f executes but not after f returns. Control(f func(fd uintptr)) error // Read invokes f on the underlying connection's file // descriptor or handle; f is expected to try to read from the // file descriptor. // If f returns true, Read returns. Otherwise Read blocks // waiting for the connection to be ready for reading and // tries again repeatedly. // The file descriptor is guaranteed to remain valid while f // executes but not after f returns. Read(f func(fd uintptr) (done bool)) error // Write is like Read but for writing. Write(f func(fd uintptr) (done bool)) error }
A RawConn is a raw network connection.
Click to show internal directories.
Click to hide internal directories.