Hi friends! Just out of curiosity, what are you us...
# multiplatform
p
Hi friends! Just out of curiosity, what are you using for I/O? We were looking for a library that could help us have most of JVM
Path
/
File
capabilites... So far, we were looking into
FileKit
,
fleeksoft-io
and
okio
. Any suggestions are welcome! Thanks!
j
When in doubt, go official! https://github.com/Kotlin/kotlinx-io
As far as I remember,
okio
was basically merged into this one. You'll notice it looks very similar.
s
It really depends on your needs. If you need cross-platform file open dialogs for a UI, go with FileKit.
p
Thanks for the suggestions, friends! For us, it would be good to have something that mimics the basic
Path
operations (is file, is directory, is absolute, create directory, delete directory, write text, read text, read lines, normalize, resolve, etc), but I know this is tricky. 😅
j
AFAIK, you should be able to do all of those things with KotlinX IO, and if not, they should probably be added. Is there something insufficient in it?
p
@joseph_ivie To be honest, it's been a while since we last check KotlinX IO, so my knowledge is really outdated. 😅 I will definitely check it out! Thanks Joseph!
j
Okio was not merged into kotlinx-io. The latter has a byte movement API which is heavily inspired by Okio and arguably more powerful, but otherwise is anemic in the convenience features on top of that which it provides (or doesn't provide).
kotlinx-io has its own FS API that is not the same as Okio's, and I would expect the design of its API to undergo significant change based on the open issues and discussion.
j
Ah, my bad.
j
Both Okio and kotlinx-io should be able to do all of the "basic path operations" listed above, though.
s
gratitude thank you 1