positionAsync

suspend fun FileStream.positionAsync(): Long(source)

An asynchronous version of FileStream.position. 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 <S : FileStream> S.positionAsync(new: Long): S(source)

An asynchronous version of FileStream.position. 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