How do I specify a working directory for mnesia
without resorting to passing the "dir" parameter on the command-line?
In other words, can I specify a "working directory" for mnesia just before calling `mnesia:start()' ?
How do I specify a working directory for mnesia
without resorting to passing the "dir" parameter on the command-line?
In other words, can I specify a "working directory" for mnesia just before calling `mnesia:start()' ?
application:set_env(mnesia, dir, Dir).
Besides the method call mentioned in other responses here you can also specify this in a system configuration file or .app file specified with the -config parameter. See http://erlang.org/doc/design_principles/applications.html#id2270704 for more information. This allows you keep the configuration seperate from the code and avoid a lot of command line flags.
© 2022 - 2024 — McMap. All rights reserved.
application_controller:set_env
is the "API" to this process.application:set_env
is a more abstract call, that just deals with applications. No wonder though that currently it only calls into that API. – Iceberg