'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Path.write_bytes 3 2025-04-21 "Tomo man-pages" .SH NAME Path.write_bytes \- write bytes to a file .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Path.write_bytes\ :\ func(path:\ Path,\ bytes:\ [Byte],\ permissions\ =\ Int32(0o644)\ ->\ Void) .fi .SH DESCRIPTION Writes the given bytes 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. - bytes [Byte] A list of bytes to write to the file. - permissions The permissions to set on the file if it is created. Int32(0o644) .TE .SH RETURN Nothing. .SH EXAMPLES .EX (./file.txt).write_bytes([104, 105]) .EE