You can really only use with in-memory things for ...
# squarelibraries
j
You can really only use with in-memory things for JS, or for NodeJS there is a blocking implementation but you wouldn't want to use that in any kind of high-throughput server where one would normally choose NodeJS.
a
thanks Jake - I thought the docs meant that FileSystem is available for JS only for NodeJS, so I disabled the browser target but it still didn’t work. But never mind, I can try another approach. I just need to load files for testing so performance isn’t a high priority.
y
Has anyone done IO well for Kotlin JS?
In theory an OkHttp Response would be returned once the response headers are there. But then response.body.string is awkward. Should it be some JS friendly type like a Promise?
a
Thanks @jessewilson - I saw that but I was more commenting on my confusion with the Okio docs, which I think should be updated to be more clear. I’m going to give this plugin a try https://github.com/goncalossilva/kotlinx-resources/