useAsync

inline suspend fun <S : FileStream?, R> S.useAsync(block: (S) -> R): R(source)

An asynchronous version of io.matthewnelson.kmp.file.use whereby closeAsync is called in lieu of FileStream.close.

See also