loadenv(filename)
D = loadenv(filename)
| Parameter | Description |
|---|---|
| filename | string scalar, character vector: environment filename. |
| Parameter | Description |
|---|---|
| s | dictionary: the environment variables and their values. |
loadenv(filename) loads environment variables from a .env or plain text file by parsing one key-value pair per line and sets them as environment variables in the Nelson environment.
D = loadenv(filename) returns a dictionary containing the parsed key-value pairs. When an output argument is specified, loadenv does not modify the Nelson environment.
env_file = [modulepath('os_functions', 'tests'), '/sample.env'];
D = loadenv(env_file)
getenv('Key1')
loadenv(env_file)
getenv('Key1')
| Version | Description |
|---|---|
| 1.15.0 | initial version |