Skip to content

File I/O

Read and write files.

Writing Files

let content = "Hello, File!";
write_file("output.txt", content);

Reading Files

let content = read_file("output.txt");
print content;

Appending to Files

append_file("log.txt", "New log entry\n");

Checking File Existence

if file_exists("config.txt") == true {
    let config = read_file("config.txt");
    print config;
} else {
    print "Config file not found";
}