19 lines
621 B
Plaintext
19 lines
621 B
Plaintext
:sig
|
|
bool file_put_contents(String file_name, String content)
|
|
|
|
:params
|
|
file_name : file name of file that should be written
|
|
content : content that should be written
|
|
return value : true if write was successful
|
|
|
|
:see
|
|
>sys
|
|
|
|
:content
|
|
Writes `content` into the file identified by `file_name`, overwriting any pre-existing content.
|
|
|
|
The write transparently takes an exclusive file lock for the duration of the truncate-and-write operation. Concurrent writers are serialized, and `file_get_contents()` waits for in-progress writes to finish; callers do not manage locks manually.
|
|
|
|
:example
|
|
print("file_put_contents example\n");
|