writeAsync

suspend fun FileStream.Write.writeAsync(buf: ByteArray, offset: Int, len: Int)(source)
inline suspend fun FileStream.Write.writeAsync(buf: ByteArray)(source)

An asynchronous version of FileStream.Write.write. If FileStream was not opened using AsyncFs, thus not inheriting its CoroutineContext, then the default AsyncFs.ctx will be used instead.

NOTE: On Js/WasmJs, this function acquires a position lock. Synchronous FileStream function calls also requiring the position lock will result in failure until this asynchronous function returns. This is a platform limitation and can be avoided by not intermixing synchronous, and asynchronous functionality.

See also


suspend fun FileStream.Write.writeAsync(buf: ByteArray, offset: Int, len: Int, position: Long)(source)
inline suspend fun FileStream.Write.writeAsync(buf: ByteArray, position: Long)(source)

An asynchronous version of FileStream.Write.write. If FileStream was not opened using AsyncFs, thus not inheriting its CoroutineContext, then the default AsyncFs.ctx will be used instead.

See also

suspend fun FileStream.Write.writeAsync(buf: Buffer, offset: Long, len: Long)(source)
inline suspend fun FileStream.Write.writeAsync(buf: Buffer)(source)

An asynchronous version of FileStream.Write.write. If FileStream was not opened using AsyncFs, thus not inheriting its CoroutineContext, then the default AsyncFs.ctx will be used instead.

NOTE: This function acquires a position lock. Synchronous FileStream function calls also requiring the position lock will result in failure until this asynchronous function returns. This is a platform limitation and can be avoided by not intermixing synchronous, and asynchronous functionality.

See also


suspend fun FileStream.Write.writeAsync(buf: Buffer, offset: Long, len: Long, position: Long)(source)
inline suspend fun FileStream.Write.writeAsync(buf: Buffer, position: Long)(source)

An asynchronous version of FileStream.Write.write. If FileStream was not opened using AsyncFs, thus not inheriting its CoroutineContext, then the default AsyncFs.ctx will be used instead.

See also