Can <java.io> be used in multiplatform or is there...
# multiplatform
a
Can java.io be used in multiplatform or is there an equivalent kotlin package that I need to use? Or is there a "multiplatform" properties file loader that anybody knows about? Thanks!
a
No java.io What class do you want to use?
m
kotlinx-serialization
has experimental
properties
support: https://github.com/Kotlin/kotlinx.serialization/tree/master/formats#properties
a
I'm BufferedReader / File / FileReader / Reader
m
As for loading files, there’s no multiplatform way afaik.
a
ic
m
I think Korio may work for your use case https://korlibs.soywiz.com/korio/
a
I looked into the whole korlibs but there's no documentation. Apparently, I need to read the source code to grok how to use it.
But I'll look at it again. Thanks!
m
Agreed, documentation is lacking. You can join Slack/Discord channels mentioned on the site, the community might be able to help.
a
https://korlibs.soywiz.com/korio/
Http server? Even in native? Looks like the great library.
a
Correct me if I'm wrong, but Okio is not for JavaScript
My project currently targets JVM and JS
Unless there's an update that I didn't see
m
Also JS browser? How would you use a
FileReader
or alike in a browser for example? 🤔 What do you want to achieve?
a
NodeJS
👌 1
No browser support
o
Okio-files dont have js support, yes, may be in future, you can ask there :) It has buffers support on js
a
I wrote the entire library already, but putting it in a multiplatform project, it blew up (obviously 🙂 ). So now I'm scrambling to "multiplatform-irize" it
KMM is like the Devil: You accept the promise, but you have to pay a high price to achieve it! 🙂
korlibs is for kotlin 1.3. I'm using 1.4.20. @Mayank have you used this lib in 1.4+?
t
pretty sure korio is 1.4 even if not all korlibs are
👍 2
m
yes, Korlibs use 1.4.20 for version 2.0 and above.
🙏 1
a
Also, any chance that it will be in jcenter? Our company has an artifactory server which I MUST use.
(I know I may be asking the wrong person. 🙂 )
m