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
Adam S
06/05/2023, 7:48 PM
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.
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
Adam S
06/06/2023, 7:47 AM
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/