Return to Roc packages
Documentation
Path
▶
MetadataErr
Path
DirEntry
ReadErr
WriteErr
DirErr
write
writeBytes
writeUtf8
fromStr
fromBytes
display
isDir
isFile
isSymLink
type
withExtension
delete
readUtf8
readBytes
listDir
deleteEmpty
deleteAll
createDir
createAll
Arg
▶
list
parse
Dir
▶
Err
DirEntry
list
deleteEmpty
deleteAll
create
createAll
Env
▶
cwd
setCwd
exePath
var
decode
dict
platform
tempDir
File
▶
ReadErr
WriteErr
write
writeBytes
writeUtf8
delete
readBytes
readUtf8
isDir
isFile
isSymLink
type
Reader
openReader
openReaderWithCapacity
readLine
FileMetadata
▶
FileMetadata
bytes
isReadonly
type
mode
Http
▶
Request
Method
Header
TimeoutConfig
Response
Err
errorBodyToBytes
defaultRequest
header
handleStringResponse
errorToString
send
get
Stderr
▶
Err
line
write
Stdin
▶
Err
line
bytes
readToEnd
Stdout
▶
Err
line
write
Tcp
▶
Stream
ConnectErr
StreamErr
connect
readUpTo
readExactly
readUntil
readLine
write
writeUtf8
connectErrToStr
streamErrToStr
Url
▶
Url
reserve
fromStr
toStr
append
appendParam
withQuery
query
hasQuery
fragment
withFragment
hasFragment
Utc
▶
Utc
now
toMillisSinceEpoch
fromMillisSinceEpoch
toNanosSinceEpoch
fromNanosSinceEpoch
deltaAsMillis
deltaAsNanos
Sleep
▶
millis
Cmd
▶
Cmd
Err
outputErrToStr
Output
new
arg
args
env
envs
clearEnvs
output
status
exec
Tty
▶
enableRawMode
disableRawMode
(press
s
)
Path
.
MetadataErr
Path
.
Path
Path
.
DirEntry
Path
.
ReadErr
Path
.
WriteErr
Path
.
DirErr
Path
.
write
: val, Path, fmt -> Task {} [FileWriteErr Path WriteErr] where val implements Encoding, fmt implements EncoderFormatting
Path
.
writeBytes
: List U8, Path -> Task {} [FileWriteErr Path WriteErr]
Path
.
writeUtf8
: Str, Path -> Task {} [FileWriteErr Path WriteErr]
Path
.
fromStr
: Str -> Path
Path
.
fromBytes
: List U8 -> Path
Path
.
display
: Path -> Str
Path
.
isDir
: Path -> Task Bool [PathErr MetadataErr]
Path
.
isFile
: Path -> Task Bool [PathErr MetadataErr]
Path
.
isSymLink
: Path -> Task Bool [PathErr MetadataErr]
Path
.
type
: Path -> Task [ IsFile, IsDir, IsSymLink ] [PathErr MetadataErr]
Path
.
withExtension
: Path, Str -> Path
Path
.
delete
: Path -> Task {} [FileWriteErr Path WriteErr]
Path
.
readUtf8
: Path -> Task Str [ FileReadErr Path ReadErr, FileReadUtf8Err Path ]
Path
.
readBytes
: Path -> Task (List U8) [FileReadErr Path ReadErr]
Path
.
listDir
: Path -> Task (List Path) [DirErr DirErr]
Path
.
deleteEmpty
: Path -> Task {} [DirErr DirErr]
Path
.
deleteAll
: Path -> Task {} [DirErr DirErr]
Path
.
createDir
: Path -> Task {} [DirErr DirErr]
Path
.
createAll
: Path -> Task {} [DirErr DirErr]
Arg
.
list
: {} -> Task (List Str) *
Arg
.
parse
: CliParser state -> Task state [ Exit I32 Str, StdoutErr Stdout.Err ]
Dir
.
Err
: Path.DirErr
Dir
.
DirEntry
: Path.DirEntry
Dir
.
list
: Str -> Task (List Path) [DirErr Err]
Dir
.
deleteEmpty
: Str -> Task {} [DirErr Err]
Dir
.
deleteAll
: Str -> Task {} [DirErr Err]
Dir
.
create
: Str -> Task {} [DirErr Err]
Dir
.
createAll
: Str -> Task {} [DirErr Err]
Env
.
cwd
: Task Path [CwdUnavailable]
Env
.
setCwd
: Path -> Task {} [InvalidCwd]
Env
.
exePath
: Task Path [ExePathUnavailable]
Env
.
var
: Str -> Task Str [VarNotFound]
Env
.
decode
: Str -> Task val [ VarNotFound, DecodeErr DecodeError ] where val implements Decoding
Env
.
dict
: {} -> Task (Dict Str Str) *
Env
.
platform
: Task { arch : ARCH, os : OS } *
Env
.
tempDir
: {} -> Task Path *
File
.
ReadErr
: Path.ReadErr
File
.
WriteErr
: Path.WriteErr
File
.
write
: val, Str, fmt -> Task {} [FileWriteErr Path WriteErr] where val implements Encoding, fmt implements EncoderFormatting
File
.
writeBytes
: List U8, Str -> Task {} [FileWriteErr Path WriteErr]
File
.
writeUtf8
: Str, Str -> Task {} [FileWriteErr Path WriteErr]
File
.
delete
: Str -> Task {} [FileWriteErr Path WriteErr]
File
.
readBytes
: Str -> Task (List U8) [FileReadErr Path ReadErr]
File
.
readUtf8
: Str -> Task Str [ FileReadErr Path ReadErr, FileReadUtf8Err Path ]
File
.
isDir
: Str -> Task Bool [PathErr MetadataErr]
File
.
isFile
: Str -> Task Bool [PathErr MetadataErr]
File
.
isSymLink
: Str -> Task Bool [PathErr MetadataErr]
File
.
type
: Str -> Task [ IsFile, IsDir, IsSymLink ] [PathErr MetadataErr]
File
.
Reader
File
.
openReader
: Str -> Task Reader [GetFileReadErr Path ReadErr]
File
.
openReaderWithCapacity
: Str, U64 -> Task Reader [GetFileReadErr Path ReadErr]
File
.
readLine
: Reader -> Task (List U8) [FileReadErr Path Str]
FileMetadata
.
FileMetadata
FileMetadata
.
bytes
: FileMetadata -> U64
FileMetadata
.
isReadonly
: FileMetadata -> Bool
FileMetadata
.
type
: FileMetadata -> [ File, Dir, Symlink ]
FileMetadata
.
mode
: FileMetadata -> [ Unix U32, NonUnix ]
Http
.
Request
Http
.
Method
Http
.
Header
Http
.
TimeoutConfig
Http
.
Response
Http
.
Err
Http
.
errorBodyToBytes
Http
.
defaultRequest
: Request
Http
.
header
: Str, Str -> Header
Http
.
handleStringResponse
: Response -> Result Str Err
Http
.
errorToString
: Err -> Str
Http
.
send
: Request -> Task Response [HttpErr Err]
Http
.
get
: Str, fmt -> Task body [ HttpErr Http.Err, HttpDecodingFailed ] where body implements Decoding, fmt implements DecoderFormatting
Stderr
.
Err
Stderr
.
line
: Str -> Task {} [StderrErr Err]
Stderr
.
write
: Str -> Task {} [StderrErr Err]
Stdin
.
Err
Stdin
.
line
: Task Str [StdinErr Err]
Stdin
.
bytes
: {} -> Task (List U8) *
Stdin
.
readToEnd
: {} -> Task (List U8) [StdinErr Err]
Stdout
.
Err
Stdout
.
line
: Str -> Task {} [StdoutErr Err]
Stdout
.
write
: Str -> Task {} [StdoutErr Err]
Tcp
.
Stream
Tcp
.
ConnectErr
Tcp
.
StreamErr
Tcp
.
connect
: Str, U16 -> Task Stream ConnectErr
Tcp
.
readUpTo
: Stream, U64 -> Task (List U8) [TcpReadErr StreamErr]
Tcp
.
readExactly
: Stream, U64 -> Task (List U8) [ TcpReadErr StreamErr, TcpUnexpectedEOF ]
Tcp
.
readUntil
: Stream, U8 -> Task (List U8) [TcpReadErr StreamErr]
Tcp
.
readLine
: Stream -> Task Str [ TcpReadErr StreamErr, TcpReadBadUtf8 ]
Tcp
.
write
: Stream, List U8 -> Task {} [TcpWriteErr StreamErr]
Tcp
.
writeUtf8
: Stream, Str -> Task {} [TcpWriteErr StreamErr]
Tcp
.
connectErrToStr
: ConnectErr -> Str
Tcp
.
streamErrToStr
: StreamErr -> Str
Url
.
Url
Url
.
reserve
: Url, U64 -> Url
Url
.
fromStr
: Str -> Url
Url
.
toStr
: Url -> Str
Url
.
append
: Url, Str -> Url
Url
.
appendParam
: Url, Str, Str -> Url
Url
.
withQuery
: Url, Str -> Url
Url
.
query
: Url -> Str
Url
.
hasQuery
: Url -> Bool
Url
.
fragment
: Url -> Str
Url
.
withFragment
: Url, Str -> Url
Url
.
hasFragment
: Url -> Bool
Utc
.
Utc
Utc
.
now
: {} -> Task Utc *
Utc
.
toMillisSinceEpoch
: Utc -> I128
Utc
.
fromMillisSinceEpoch
: I128 -> Utc
Utc
.
toNanosSinceEpoch
: Utc -> I128
Utc
.
fromNanosSinceEpoch
: I128 -> Utc
Utc
.
deltaAsMillis
: Utc, Utc -> U128
Utc
.
deltaAsNanos
: Utc, Utc -> U128
Sleep
.
millis
: U64 -> Task {} *
Cmd
.
Cmd
Cmd
.
Err
Cmd
.
outputErrToStr
: ( Output, Err ) -> Str
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
.
clearEnvs
: Cmd -> Cmd
Cmd
.
output
: Cmd -> Task Output [ CmdOutputError ( Output, Err ) ]
Cmd
.
status
: Cmd -> Task {} [CmdError Err]
Cmd
.
exec
: Str, List Str -> Task {} [CmdError Err]
Tty
.
enableRawMode
: {} -> Task {} *
Tty
.
disableRawMode
: {} -> Task {} *
Exposed Modules
LLM docs
Path
Arg
Dir
Env
File
FileMetadata
Http
Stderr
Stdin
Stdout
Tcp
Url
Utc
Sleep
Cmd
Tty