uce/site/doc/pages/file_write.txt
2026-06-16 12:21:31 +00:00

12 lines
543 B
Plaintext

file_write
Streaming/handle-based file I/O across the wasm host membrane. Handles are opaque u64 values returned by file_open(); 0 means open failed (including path policy denial or bounded lock timeout). Locks are automatic and lifetime-scoped: read opens take a shared lock, write/append/read-write opens take an exclusive lock, and file_close() releases it. Lock wait is bounded by UCE_FILE_LOCK_TIMEOUT_MS (default 2000ms).
See also: file_get_contents, file_put_contents, file_append.
:see
>sys
:example
print("file_write example\n");