how to access a file stored on the main project fo...
# compose-desktop
p
how to access a file stored on the main project folder?
Copy code
val routesPath = "gtfs-files/routes.txt"
val file = File(routesPath)
BufferedReader(FileReader(file))
That gives
FileNotFoundException
but the files are on that folder in the project main directory
k
Nothing to do with Compose. Put that under
src/main/resources
and that will get copied into the
build
folder so that you can access it with whatever Java APIs you’re using.