:sig
function file_pwrite(handle : u64, offset : u64, data : string) u64

:params
handle : writable handle returned by `file_open`
offset : absolute byte offset
data : text to write

:returns
The number of bytes written.

:content
`file_pwrite` writes text at an absolute byte offset. It does not change the handle position.

:example capy render
var handle := file_open("/tmp/doc-pwrite.txt", "w")
file_write(handle, "hello world")
file_close(handle)
var editor := file_open("/tmp/doc-pwrite.txt", "r+")
file_pwrite(editor, u64(6), "earth")
file_close(editor)
print(file_get_contents("/tmp/doc-pwrite.txt"), "\n")

:see-group
file-handles
