I've been using Okio (version 3.3.0) to manage files on a multi-platform project and it works just fine, thanks đź‘Ť.
In this project I build a cli tool using GraalVM to produce an executable. I copy a set of files on initialization to a tmp dir, it works just fine with jvm but I can't get it to work in a GraalVM executable.
val source = "/modules".toPath()
FileSystem.RESOURCES.listRecursively(source).forEach {
if (FileSystem.RESOURCES.metadata(it).isRegularFile) {
val stream = Common::class.java.getResourceAsStream(it.toString())
if (stream != null) {
val local = it.relativeTo(source)
val target = modules.resolve(local)
target.parent?.let { FS.createDirectories(it) }
FS.write(target) { write(stream.readAllBytes()) }
}
}
}
I build the executable with this ressource inclusion file:
I believe that listing resources is not supported in a GraalVM executable but I may have used Okio in a wrong way.
I haven't any indication that it is not supported.
Can you tell if it is possible to list and copy resources using Okio from a GraalVM execute ?
Hi,
I've been using Okio (version 3.3.0) to manage files on a multi-platform project and it works just fine, thanks đź‘Ť.
In this project I build a cli tool using GraalVM to produce an executable. I copy a set of files on initialization to a tmp dir, it works just fine with jvm but I can't get it to work in a GraalVM executable.
I build the executable with this ressource inclusion file:
I believe that listing resources is not supported in a GraalVM executable but I may have used Okio in a wrong way. I haven't any indication that it is not supported. Can you tell if it is possible to list and copy resources using Okio from a GraalVM execute ?
Thanks for your help.