sync

expect abstract override fun sync(meta: Boolean): FileStream.Read(source)

Syncs any updates to the File for which this stream belongs, to the device filesystem. This is akin to fsync/fdatasync.

If the stream's File resides locally on the device then upon return of this function it is guaranteed that all changes made to the File since this stream was created, or since this function was last called, will have been written to said device. This is useful for ensuring that critical information is not lost in the event of a system crash.

If the stream's File does not reside locally on the device, then no such guarantee is made.

Only changes made via this stream are guaranteed to be updated as a result of this function call.

Return

The Read stream for chaining operations.

Parameters

meta

If false, only updates to the File content will be written to storage. If true, updates to both the File content and its metadata will be written to storage.

Throws

If an I/O error occurs, or the stream is closed.

actual abstract override fun sync(meta: Boolean): FileStream.Read(source)
actual abstract override fun sync(meta: Boolean): FileStream.Read(source)
actual abstract override fun sync(meta: Boolean): FileStream.Read(source)