https://kotlinlang.org logo
a

Alfred Lopez

12/15/2020, 12:40 PM
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

aleksey.tomin

12/15/2020, 12:42 PM
No java.io What class do you want to use?
m

Marc Knaup

12/15/2020, 12:43 PM
kotlinx-serialization
has experimental
properties
support: https://github.com/Kotlin/kotlinx.serialization/tree/master/formats#properties
a

Alfred Lopez

12/15/2020, 12:43 PM
I'm BufferedReader / File / FileReader / Reader
m

Marc Knaup

12/15/2020, 12:43 PM
As for loading files, there’s no multiplatform way afaik.
a

Alfred Lopez

12/15/2020, 12:44 PM
ic
m

Mayank

12/15/2020, 12:44 PM
I think Korio may work for your use case https://korlibs.soywiz.com/korio/
a

Alfred Lopez

12/15/2020, 12:45 PM
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

Mayank

12/15/2020, 12:53 PM
Agreed, documentation is lacking. You can join Slack/Discord channels mentioned on the site, the community might be able to help.
a

aleksey.tomin

12/15/2020, 12:57 PM
https://korlibs.soywiz.com/korio/
Http server? Even in native? Looks like the great library.
a

Alfred Lopez

12/15/2020, 12:57 PM
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

Marc Knaup

12/15/2020, 12:59 PM
Also JS browser? How would you use a
FileReader
or alike in a browser for example? 🤔 What do you want to achieve?
a

Alfred Lopez

12/15/2020, 12:59 PM
NodeJS
👌 1
No browser support
o

Oleg Yukhnevich

12/15/2020, 1:00 PM
Okio-files dont have js support, yes, may be in future, you can ask there :) It has buffers support on js
a

Alfred Lopez

12/15/2020, 1:01 PM
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

Tijl

12/15/2020, 1:26 PM
pretty sure korio is 1.4 even if not all korlibs are
👍 2
m

Mayank

12/15/2020, 1:32 PM
yes, Korlibs use 1.4.20 for version 2.0 and above.
🙏 1
a

Alfred Lopez

12/15/2020, 1:33 PM
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

Mayank

12/15/2020, 1:50 PM
2 Views