Return to Roc packages
Documentation
Path
▶
Path
DirEntry
IOErr
write!
write_bytes!
write_utf8!
from_str
from_bytes
display
is_dir!
is_file!
is_sym_link!
type!
with_extension
delete!
read_utf8!
read_bytes!
list_dir!
delete_empty!
delete_all!
create_dir!
create_all!
hard_link!
Arg
▶
Arg
to_os_raw
from_os_raw
display
Dir
▶
IOErr
DirEntry
list!
delete_empty!
delete_all!
create!
create_all!
Env
▶
cwd!
set_cwd!
exe_path!
var!
decode!
dict!
platform!
temp_dir!
File
▶
IOErr
write!
write_bytes!
write_utf8!
delete!
read_bytes!
read_utf8!
hard_link!
is_dir!
is_file!
is_sym_link!
type!
Reader
open_reader!
open_reader_with_capacity!
read_line!
FileMetadata
▶
FileMetadata
bytes
is_readonly
type
mode
Http
▶
Method
Header
Request
Response
default_request
header
send!
get!
get_utf8!
Stderr
▶
IOErr
line!
write!
Stdin
▶
IOErr
line!
bytes!
read_to_end!
Stdout
▶
IOErr
line!
write!
Tcp
▶
Stream
ConnectErr
StreamErr
connect!
read_up_to!
read_exactly!
read_until!
read_line!
write!
write_utf8!
connect_err_to_str
stream_err_to_str
Url
▶
Url
reserve
from_str
to_str
append
append_param
with_query
query
has_query
fragment
with_fragment
has_fragment
query_params
Utc
▶
Utc
now!
to_millis_since_epoch
from_millis_since_epoch
to_nanos_since_epoch
from_nanos_since_epoch
delta_as_millis
delta_as_nanos
to_iso_8601
Sleep
▶
millis!
Cmd
▶
Cmd
Output
new
arg
args
env
envs
clear_envs
output!
status!
exec!
Tty
▶
enable_raw_mode!
disable_raw_mode!
Locale
▶
get!
all!
(press
s
)
Path
.
Path
Path
.
DirEntry
Path
.
IOErr
Path
.
write!
: val, Path, fmt => Result {} [FileWriteErr Path IOErr] where val implements Encoding, fmt implements EncoderFormatting
Path
.
write_bytes!
: List U8, Path => Result {} [FileWriteErr Path IOErr]
Path
.
write_utf8!
: Str, Path => Result {} [FileWriteErr Path IOErr]
Path
.
from_str
: Str -> Path
Path
.
from_bytes
: List U8 -> Path
Path
.
display
: Path -> Str
Path
.
is_dir!
: Path => Result Bool [PathErr IOErr]
Path
.
is_file!
: Path => Result Bool [PathErr IOErr]
Path
.
is_sym_link!
: Path => Result Bool [PathErr IOErr]
Path
.
type!
: Path => Result [ IsFile, IsDir, IsSymLink ] [PathErr IOErr]
Path
.
with_extension
: Path, Str -> Path
Path
.
delete!
: Path => Result {} [FileWriteErr Path IOErr]
Path
.
read_utf8!
: Path => Result Str [ FileReadErr Path IOErr, FileReadUtf8Err Path ]
Path
.
read_bytes!
: Path => Result (List U8) [FileReadErr Path IOErr]
Path
.
list_dir!
: Path => Result (List Path) [DirErr IOErr]
Path
.
delete_empty!
: Path => Result {} [DirErr IOErr]
Path
.
delete_all!
: Path => Result {} [DirErr IOErr]
Path
.
create_dir!
: Path => Result {} [DirErr IOErr]
Path
.
create_all!
: Path => Result {} [DirErr IOErr]
Path
.
hard_link!
: Path => Result {} [LinkErr IOErr]
Arg
.
Arg
Arg
.
to_os_raw
: Arg -> [ Unix (List U8), Windows (List U16) ]
Arg
.
from_os_raw
: [ Unix (List U8), Windows (List U16) ] -> Arg
Arg
.
display
: Arg -> Str
Dir
.
IOErr
Dir
.
DirEntry
: Path.DirEntry
Dir
.
list!
: Str => Result (List Path) [DirErr IOErr]
Dir
.
delete_empty!
: Str => Result {} [DirErr IOErr]
Dir
.
delete_all!
: Str => Result {} [DirErr IOErr]
Dir
.
create!
: Str => Result {} [DirErr IOErr]
Dir
.
create_all!
: Str => Result {} [DirErr IOErr]
Env
.
cwd!
: {} => Result Path [CwdUnavailable]
Env
.
set_cwd!
: Path => Result {} [InvalidCwd]
Env
.
exe_path!
: {} => Result Path [ExePathUnavailable]
Env
.
var!
: Str => Result Str [VarNotFound]
Env
.
decode!
: Str => Result val [ VarNotFound, DecodeErr DecodeError ] where val implements Decoding
Env
.
dict!
: {} => Dict Str Str
Env
.
platform!
: {} => { arch : ARCH, os : OS }
Env
.
temp_dir!
: {} => Path
File
.
IOErr
File
.
write!
: val, Str, fmt => Result {} [FileWriteErr Path IOErr] where val implements Encoding, fmt implements EncoderFormatting
File
.
write_bytes!
: List U8, Str => Result {} [FileWriteErr Path IOErr]
File
.
write_utf8!
: Str, Str => Result {} [FileWriteErr Path IOErr]
File
.
delete!
: Str => Result {} [FileWriteErr Path IOErr]
File
.
read_bytes!
: Str => Result (List U8) [FileReadErr Path IOErr]
File
.
read_utf8!
: Str => Result Str [ FileReadErr Path IOErr, FileReadUtf8Err Path ]
File
.
hard_link!
: Str => Result {} [LinkErr IOErr]
File
.
is_dir!
: Str => Result Bool [PathErr IOErr]
File
.
is_file!
: Str => Result Bool [PathErr IOErr]
File
.
is_sym_link!
: Str => Result Bool [PathErr IOErr]
File
.
type!
: Str => Result [ IsFile, IsDir, IsSymLink ] [PathErr IOErr]
File
.
Reader
File
.
open_reader!
: Str => Result Reader [GetFileReadErr Path IOErr]
File
.
open_reader_with_capacity!
: Str, U64 => Result Reader [GetFileReadErr Path IOErr]
File
.
read_line!
: Reader => Result (List U8) [FileReadErr Path IOErr]
FileMetadata
.
FileMetadata
FileMetadata
.
bytes
: FileMetadata -> U64
FileMetadata
.
is_readonly
: FileMetadata -> Bool
FileMetadata
.
type
: FileMetadata -> [ File, Dir, Symlink ]
FileMetadata
.
mode
: FileMetadata -> [ Unix U32, NonUnix ]
Http
.
Method
Http
.
Header
Http
.
Request
Http
.
Response
Http
.
default_request
: Request
Http
.
header
: ( Str, Str ) -> Header
Http
.
send!
: Request => Response
Http
.
get!
: Str, fmt => Result body [HttpDecodingFailed] where body implements Decoding, fmt implements DecoderFormatting
Http
.
get_utf8!
: Str => Result Str [BadBody Str]
Stderr
.
IOErr
Stderr
.
line!
: Str => Result {} [StderrErr IOErr]
Stderr
.
write!
: Str => Result {} [StderrErr IOErr]
Stdin
.
IOErr
Stdin
.
line!
: {} => Result Str [ EndOfFile, StdinErr IOErr ]
Stdin
.
bytes!
: {} => Result (List U8) [ EndOfFile, StdinErr IOErr ]
Stdin
.
read_to_end!
: {} => Result (List U8) [StdinErr IOErr]
Stdout
.
IOErr
Stdout
.
line!
: Str => Result {} [StdoutErr IOErr]
Stdout
.
write!
: Str => Result {} [StdoutErr IOErr]
Tcp
.
Stream
Tcp
.
ConnectErr
Tcp
.
StreamErr
Tcp
.
connect!
: Str, U16 => Result Stream ConnectErr
Tcp
.
read_up_to!
: Stream, U64 => Result (List U8) [TcpReadErr StreamErr]
Tcp
.
read_exactly!
: Stream, U64 => Result (List U8) [ TcpReadErr StreamErr, TcpUnexpectedEOF ]
Tcp
.
read_until!
: Stream, U8 => Result (List U8) [TcpReadErr StreamErr]
Tcp
.
read_line!
: Stream => Result Str [ TcpReadErr StreamErr, TcpReadBadUtf8 ]
Tcp
.
write!
: Stream, List U8 => Result {} [TcpWriteErr StreamErr]
Tcp
.
write_utf8!
: Stream, Str => Result {} [TcpWriteErr StreamErr]
Tcp
.
connect_err_to_str
: ConnectErr -> Str
Tcp
.
stream_err_to_str
: StreamErr -> Str
Url
.
Url
Url
.
reserve
: Url, U64 -> Url
Url
.
from_str
: Str -> Url
Url
.
to_str
: Url -> Str
Url
.
append
: Url, Str -> Url
Url
.
append_param
: Url, Str, Str -> Url
Url
.
with_query
: Url, Str -> Url
Url
.
query
: Url -> Str
Url
.
has_query
: Url -> Bool
Url
.
fragment
: Url -> Str
Url
.
with_fragment
: Url, Str -> Url
Url
.
has_fragment
: Url -> Bool
Url
.
query_params
: Url -> Dict Str Str
Utc
.
Utc
Utc
.
now!
: {} => Utc
Utc
.
to_millis_since_epoch
: Utc -> I128
Utc
.
from_millis_since_epoch
: I128 -> Utc
Utc
.
to_nanos_since_epoch
: Utc -> I128
Utc
.
from_nanos_since_epoch
: I128 -> Utc
Utc
.
delta_as_millis
: Utc, Utc -> U128
Utc
.
delta_as_nanos
: Utc, Utc -> U128
Utc
.
to_iso_8601
: Utc -> Str
Sleep
.
millis!
: U64 => {}
Cmd
.
Cmd
Cmd
.
Output
Cmd
.
new
: Str -> Cmd
Cmd
.
arg
: Cmd, Str -> Cmd
Cmd
.
args
: Cmd, List Str -> Cmd
Cmd
.
env
: Cmd, Str, Str -> Cmd
Cmd
.
envs
: Cmd, List ( Str, Str ) -> Cmd
Cmd
.
clear_envs
: Cmd -> Cmd
Cmd
.
output!
: Cmd => Output
Cmd
.
status!
: Cmd => Result I32 [CmdStatusErr InternalIOErr.IOErr]
Cmd
.
exec!
: Str, List Str => Result {} [CmdStatusErr InternalIOErr.IOErr]
Tty
.
enable_raw_mode!
: {} => {}
Tty
.
disable_raw_mode!
: {} => {}
Locale
.
get!
: {} => Result Str [NotAvailable]
Locale
.
all!
: {} => List Str
Exposed Modules
LLM docs
Path
Arg
Dir
Env
File
FileMetadata
Http
Stderr
Stdin
Stdout
Tcp
Url
Utc
Sleep
Cmd
Tty
Locale