file_close
host callCapy
function file_close(handle : u64)
Description
file_close closes a handle from file_open. Close a handle after the final read or write.
Parameters
handle : handle returned by file_open
Example
Capy
var handle := file_open("/tmp/doc-close.txt", "w")
file_write(handle, "done")
file_close(handle)
print(file_get_contents("/tmp/doc-close.txt"), "\n")