libnick 2025.9.1
A cross-platform base for native Nickvision applications.
|
Go to the source code of this file.
Namespaces | |
namespace | Nickvision |
namespace | Nickvision::System |
namespace | Nickvision::System::Environment |
Functions for working with the apps's shell and environment. | |
Functions | |
constexpr OperatingSystem | Nickvision::System::Environment::getOperatingSystem () noexcept |
Gets the current operating system. | |
DeploymentMode | Nickvision::System::Environment::getDeploymentMode () noexcept |
Gets the current deployment mode. | |
const std::filesystem::path & | Nickvision::System::Environment::getExecutableDirectory () noexcept |
Gets the path of the executable's directory. | |
const std::filesystem::path & | Nickvision::System::Environment::getExecutablePath () noexcept |
Gets the path of the executable file. | |
std::string | Nickvision::System::Environment::getLocaleName () noexcept |
Gets the name of the current locale. | |
bool | Nickvision::System::Environment::hasVariable (const std::string &key) noexcept |
Checks if an environment variable exists. | |
std::string | Nickvision::System::Environment::getVariable (const std::string &key) noexcept |
Gets the value of an environment variable. | |
bool | Nickvision::System::Environment::setVariable (const std::string &key, const std::string &value) noexcept |
Sets the value of an environment variable. | |
bool | Nickvision::System::Environment::clearVariable (const std::string &key) noexcept |
Clears an environment variable. | |
bool | Nickvision::System::Environment::testVariable (const std::string &key) noexcept |
Tests an environment variable value to see if it is true. | |
std::vector< std::filesystem::path > | Nickvision::System::Environment::getPath () noexcept |
Gets a list of directories from the system PATH variable. | |
std::string | Nickvision::System::Environment::exec (const std::string &cmd) noexcept |
Executes a command in the system shell. | |
std::future< std::string > | Nickvision::System::Environment::execAsync (const std::string &cmd) noexcept |
Executes a command asynchronously in the system shell. | |
const std::filesystem::path & | Nickvision::System::Environment::findDependency (std::string dependency, DependencySearchOption search=DependencySearchOption::Global) noexcept |
Finds the path of a given executable dependency in the system. | |
std::string | Nickvision::System::Environment::getDebugInformation (const App::AppInfo &appInfo, const std::string &extraInformation="") noexcept |
Gets a debug information string about the user's environment. | |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at https://www.gnu.org/copyleft/gpl.html
Functions for working with the apps's shell and environment.