Is this the correct way of using okio? ```kotlin s...
# squarelibraries
p
Is this the correct way of using okio?
Copy code
kotlin
suspend fun File.writeToOutputStream(outputStream: OutputStream) {
  withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
    Okio.buffer(Okio.sink(outputStream)).use { sink ->
      Okio.buffer(Okio.source(this@writeToOutputStream)).use { source ->
        sink.writeAll(source)
      }
    }
  }
}