![]() |
Webdar 1.0.0
Web user interface to libdar
|
class environment holds environment variables passed to webdar from its parent process (a shell for example) More...
#include <environment.hpp>
Public Member Functions | |
| environment (const environment &ref)=default | |
| environment (environment &&ref) noexcept=default | |
| environment & | operator= (const environment &ref)=default |
| environment & | operator= (environment &&ref) noexcept=default |
| void | feed (char **env) |
| feed the object with the system provided environment | |
| bool | get_value_of (const std::string &var, std::string &value) const |
| provide the value associated to a given environment variable More... | |
| std::string | get_value_with_default (const std::string &var, const std::string &defaulted) const |
| provide the value associated to a given environment variable or the provided defaulted value More... | |
class environment holds environment variables passed to webdar from its parent process (a shell for example)
| bool environment::get_value_of | ( | const std::string & | var, |
| std::string & | value | ||
| ) | const |
provide the value associated to a given environment variable
| [in] | var | is the name of the variable to fetch |
| [out] | value | is the value associated with this value if it exists |
| string environment::get_value_with_default | ( | const std::string & | var, |
| const std::string & | defaulted | ||
| ) | const |
provide the value associated to a given environment variable or the provided defaulted value
| [in] | var | is the name of the variable to fetch |
| [in] | defaulted | it the default value to return if the variable is not found in the environment |