libnick 2025.9.1
A cross-platform base for native Nickvision applications.
|
Functions for working with the apps's shell and environment. More...
Functions | |
constexpr OperatingSystem | getOperatingSystem () noexcept |
Gets the current operating system. | |
DeploymentMode | getDeploymentMode () noexcept |
Gets the current deployment mode. | |
const std::filesystem::path & | getExecutableDirectory () noexcept |
Gets the path of the executable's directory. | |
const std::filesystem::path & | getExecutablePath () noexcept |
Gets the path of the executable file. | |
std::string | getLocaleName () noexcept |
Gets the name of the current locale. | |
bool | hasVariable (const std::string &key) noexcept |
Checks if an environment variable exists. | |
std::string | getVariable (const std::string &key) noexcept |
Gets the value of an environment variable. | |
bool | setVariable (const std::string &key, const std::string &value) noexcept |
Sets the value of an environment variable. | |
bool | clearVariable (const std::string &key) noexcept |
Clears an environment variable. | |
bool | testVariable (const std::string &key) noexcept |
Tests an environment variable value to see if it is true. | |
std::vector< std::filesystem::path > | getPath () noexcept |
Gets a list of directories from the system PATH variable. | |
std::string | exec (const std::string &cmd) noexcept |
Executes a command in the system shell. | |
std::future< std::string > | execAsync (const std::string &cmd) noexcept |
Executes a command asynchronously in the system shell. | |
const std::filesystem::path & | findDependency (std::string dependency, DependencySearchOption search=DependencySearchOption::Global) noexcept |
Finds the path of a given executable dependency in the system. | |
std::string | getDebugInformation (const App::AppInfo &appInfo, const std::string &extraInformation="") noexcept |
Gets a debug information string about the user's environment. | |
Functions for working with the apps's shell and environment.
|
noexcept |
Clears an environment variable.
key | The environment variable to delete |
|
noexcept |
Executes a command in the system shell.
cmd | The command to execute |
|
noexcept |
Executes a command asynchronously in the system shell.
cmd | The command to execute |
|
noexcept |
Finds the path of a given executable dependency in the system.
dependency | The name of the executable dependency to find |
search | The DependencySearchOption to use in the dependency search |
|
noexcept |
Gets a debug information string about the user's environment.
appInfo The application's AppInfo
extraInformation Extra information to append to the end of the debug information string
|
noexcept |
Gets the current deployment mode.
|
noexcept |
Gets the path of the executable's directory.
|
noexcept |
Gets the path of the executable file.
|
noexcept |
Gets the name of the current locale.
|
constexprnoexcept |
Gets the current operating system.
|
noexcept |
Gets a list of directories from the system PATH variable.
|
noexcept |
Gets the value of an environment variable.
key | The environment variable to get |
|
noexcept |
Checks if an environment variable exists.
key | The environment variable to check |
|
noexcept |
Sets the value of an environment variable.
key | The environment variable to set |
value | The value for the environment variable |
|
noexcept |
Tests an environment variable value to see if it is true.
A true value is one that is "true", "t", "yes", "y", or "1".
key | The environment variable to test |