llm
Download
37 lines 952 BGroffModified 2026-09-01 raw
12345678910111213141516171819202122232425262728293031323334353637
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Path.write 3 2026-09-01 "Tomo man-pages"
.SH NAME
Path.write \- write to a file
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Path.write\ :\ func(path:\ Path,\ text:\ Text,\ permissions:\ Int32\ =\ Int32(0o644)\ ->\ Result)
.fi
.SH DESCRIPTION
Writes the given text to the file at the specified path, creating the file if it doesn't already exist. Sets the file permissions as specified. If the file writing cannot be successfully completed, a runtime error is raised.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
path	Path	The path of the file to write to. 	-
text	Text	The text to write to the file. 	-
permissions	Int32	The permissions to set on the file if it is created. 	Int32(0o644)
.TE
.SH RETURN
Either `Success` or `Failure{reason}`.

.SH EXAMPLES
.EX
(./file.txt).write("Hello, world!")!
.EE
.SH SEE ALSO
.BR Tomo-Path (3)