Skip to Content
i documentation
Standard library referenceModules

i/fs

File system operations.

Fs

Fs = (

File

File = (Int)

FsError

FsError = (operation = String, path = String, code = String)

OpenMode

OpenMode = ReadOnly | WriteTruncate | Append | ReadWrite

open

open = (path, mode) <- (raw : Fs) {

read

read = (File(number), max_bytes) <- (raw : Fs) {

write

write = (File(number), bytes) <- (raw : Fs) {

flush

flush = (File(number)) <- (raw : Fs) {

close

close = (File(number)) <- (raw : Fs) { request.await_owned(raw.close(number)) }

remove

remove = (path) <- (raw : Fs) {

rename

rename = (from, to) <- (raw : Fs) {

mkdir

mkdir = (path) <- (raw : Fs) {

list

list = (path) <- (raw : Fs) {

metadata

metadata = (path) <- (raw : Fs) {

temp_dir

temp_dir = () <- (raw : Fs) {

read_file

read_file = (path) {

write_file

write_file = (path, bytes) {

read_lines

read_lines = (path) {

Metadata

Metadata = (size = Int, kind = String)