env (util v1.3.5)
View SourceEnvironment utils
Author: Serge Aleynikov saleyn@gmail.com Copyright: 2012 Serge Aleynikov
Summary
Functions
Get application configuration
Perform replacement of environment variable values in the OsPath.
Perform replacement of environment variable values in the OsPath. This function
also allows to provide a list of Bindings that override the environment (they
are checked before environment variables are looked up).
subst_env_path(OsPath)
deprecated
subst_env_path(OsPath, Bindings)
deprecated
Functions
Get application configuration
Perform replacement of environment variable values in the OsPath.
Example:
env:replace_env_vars("~/app") -> "/home/cuser/app"
env:replace_env_vars("${HOME}/app") -> "/home/cuser/app"
env:replace_env_vars("$USER/app") -> "cuser/app"See: os:getenv/1.
Perform replacement of environment variable values in the OsPath. This function
also allows to provide a list of Bindings that override the environment (they
are checked before environment variables are looked up).
Example:
env:replace_env_vars("~/", [{"HOME", "/home/cu"}]) -> "/home/cu/"
env:replace_env_vars("~/", [{home, "/home/cu"}]) -> "/home/cu/"
env:replace_env_vars("$A/", [{a, "/aaa"}]) -> "/aaa/"
env:replace_env_vars("${A}/",[{a, "/aaa"}]) -> "/aaa/"See: os:getenv/1.
This function is deprecated. env:subst_env_path/1 is deprecated; use replace_env_vars/1 instead.
This function is deprecated. env:subst_env_path/2 is deprecated; use replace_env_vars/2 instead.