:sig
function file_open(path : string, mode : string) u64

:params
path : path of the file to open
mode : access mode, such as `"r"`, `"w"`, `"a"`, or `"r+"`

:returns
A file handle, or `u64(0)` when Capy cannot open the file.

:content
`file_open` opens a file for incremental access. Use the handle with `file_read`, `file_write`, `file_seek`, and `file_close`.

:example capy render
var handle := file_open("/tmp/doc-open.txt", "w")
file_write(handle, "streamed")
file_close(handle)
print(file_get_contents("/tmp/doc-open.txt"), "\n")

:see-group
file-handles

:see
file_get_contents
