Atom

fs.flush()

Synchronizes a file with the OS.

Signature

fs.flush(handle)

Parameters

Open file owned by the VM.

Returns

Null.

Behavior

Blocks until the OS sync operation returns.

Errors

Invalid handle or platform sync failure.

Example

Atom
use fs
p = fs.temporary_file()
f = fs.open(p, 'w')
write(f, 'Atom')
fs.flush(f)
fs.close(f)
fs.remove(p)