Io module

write_file

procedureextensionexperimental2 overloadsSource

Creates or replaces a file with data.

Example
Io :: #import "Extensions/Io";
#import "File";

Io.io_run(() {
    assert(Io.write_file("/tmp/jacket-io-wf.txt", "hello") == .NONE);
});
file_delete("/tmp/jacket-io-wf.txt");

Doesn't run in the browser (only on linux, macos).

write_file :: (path: string, data: [] u8) -> Io_Error

Parameters

path: string
data: [] u8

Returns

write_file :: (path: string, text: string) -> Io_Error

The write_file for a string.

Parameters

path: string
text: string

Returns

See also