![]() |
wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
|
Utility class providing static functions for managing executable and resource paths across platforms. More...
#include <wPathUtils.hpp>
Static Public Member Functions | |
static std::string | getExecutablePath () |
Returns the absolute path to the current executable. | |
static std::string | getExecutableDir () |
Returns the directory containing the current executable. |
Utility class providing static functions for managing executable and resource paths across platforms.
This class retrieves the absolute path of the current executable or its parent directory, in a portable way (macOS, Windows, Linux). It is particularly useful for locating resources such as fonts, images, or configuration files relative to the application binary.
All methods are static and do not require instantiation.
These APIs are not C++ standard and must be used with care, as they are platform-dependent.
|
staticnodiscard |
Returns the absolute path to the current executable.
Platform-specific APIs are used:
std::runtime_error | if the path cannot be resolved. |
|
staticnodiscard |
Returns the directory containing the current executable.
This is often used as a base path to resolve relative resource paths.
std::runtime_error | if the path cannot be resolved. |