I downloaded a project from <https://kmp.jetbrains...
# compose-desktop
c
I downloaded a project from https://kmp.jetbrains.com/ and it has a composeResources directory. I added
files
sub dir as per the docs. and added a text file. Now I'm trying to read it, but get an error
Missing resource with path: files/blah.txt
Ideas?
Copy code
val dictionary = readResourceBytes("files/blah.txt").decodeToString()
a
This function takes absolute path as an argument. For loading files by relative path use Res.readBytes
1
c
nice. thanks. i tried following some code i found in this slack, but i guess it was outdated
k
There is a doc about the function near with the doc about the files rirectory