I'm building a library in Elixir which processes XML-files of some kind. I'd like to ship DTD schema with it, cause that XML-files refer to it inside of <!DOCTYPE>
. How do I do so that it all worked being imported by another app.
Generalizing: how do I ship some static non-elixir files (resources) that are being used by mix project?
The usual place to put non-source code files that are required at runtime is the /priv
directory at the root of the package alongside /lib
or /config
. The compiler maintains the proper references and makes sure the directory is always available in the appropriate place when accessed through:
Application.app_dir(:my_app, "priv/path/to/file")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.