I see it is quite easy to read files (text) using File.read("filename.txt")
as per here:
From what I see, if you run your project with iex -S mix
it looks in the root folder of the project (where you run this command from).
But what happens if you build the project like following these instructions?
Where will it look in the final build? If you have file.txt
in your root project directory and are accessing that in code via File.read("file.txt")
will it still find it after this process? Will the path be the same?
How do we ensure the file is included in the build tar so that it still can be found?
Thanks for any help.