Skip to content

std/sys

This package may not be fully viewable as it is documented using juledoc. Due to its low-level nature, it contains many specific definitions. For more detailed documentation, refer to the source code.

Index

fn GetLastErrno(): Errno
fn NewTimeval(sec: i64, usec: i64, mut &out: Timeval): bool
unsafe fn Read(handle: int, mut buff: *unsafe, n: uint): int
fn Close(handle: int): int
unsafe fn Write(handle: int, buff: *unsafe, n: uint): int
fn Exit(code: int)
unsafe fn Select(nfds: int, mut read: *FdSet, mut write: *FdSet, mut err: *FdSet, mut timeout: *Timeval): int
type Errno
    fn Str(self): str

GetLastErrno

jule
fn GetLastErrno(): Errno

Returns number of last error.

NewTimeval

jule
fn NewTimeval(sec: i64, usec: i64, mut &out: Timeval): bool

Creates new Timeval by sec and usec. Sets fields of the out. Reports whether sec and usec have valid range. If sec or usec have invalid range, out will not be mutated.

Read

jule
unsafe fn Read(handle: int, mut buff: *unsafe, n: uint): int

Wrapper for C's read function.

Close

jule
fn Close(handle: int): int

Wrapper for C's close function.

Write

jule
unsafe fn Write(handle: int, buff: *unsafe, n: uint): int

Wrapper for C's write function.

Exit

jule
fn Exit(code: int)

Wrapper for C's exit.

Select

jule
unsafe fn Select(nfds: int, mut read: *FdSet, mut write: *FdSet, mut err: *FdSet, mut timeout: *Timeval): int

C's select function.

Errno

jule
type Errno: errno

Type of error number.

Str

jule
fn Str(self): str