Can someone quickly give me status of file IO? I ...
# multiplatform
u
Can someone quickly give me status of file IO? I see
okio
exists and works, but
ktor
returns a
ByteReadChannel
which is suspending. Then I see
<http://kotlinx.io|kotlinx.io>
with it's
Source/Sink
which is suspending, but then doesn't allow to write to a file?
j
kotlinx.io is not suspending
u
I see. so I should manually drain the
ByteReadChannel
?
Copy code
val sink = FileSystem.SYSTEM.sink(path).buffer()
try {
    // suspending work here
} finally {
    sink.close()
}
something like this?
also, is
FileSystem
like type coming to
<http://kotlinx.io|kotlinx.io>
?