Atom

task.write()

Starts a background path write.

Signature

task.write(path, value)

Parameters

Text path and text or packed value as for core write.

Returns

Task returning byte count.

Behavior

Copies its input to the worker. Worker replaces file contents.

Errors

Denied permission, transfer failure or worker I/O failure on wait.

Example

Atom
use task
use fs
p = fs.temporary_file()
try:
    assert(task.wait(task.write(p, 'Atom')) == 4)
finally:
    fs.remove(p)