std.fs.write_file

std.fs

write_file(filename, text) -> ok, err

Write text content to a file

Opens path for writing (mode "w+"), which creates the file if it does not exist and truncates it if it does. Writes text and closes the file. Returns true on success, or nil and an error string on failure.