|
OXY API 1.0
OXY API Library Documentation
|
Function object to expand environment variables in strings and paths. More...
#include <envvar.hpp>
Public Member Functions | |
| result< std::filesystem::path > | operator() (std::filesystem::path const &source) const |
| result< std::string > | operator() (std::string const &source) const |
Function object to expand environment variables in strings and paths.
This functor provides two overloads to expand environment variables in a given string or filesystem path. It returns a result type that contains the expanded string or path on success, or an error code on failure. This allows for safe handling of environment variable expansion, providing feedback on any issues encountered during the process.
| result< std::filesystem::path > oxy::expandEnvVar_fn::operator() | ( | std::filesystem::path const & | source | ) | const |
| source | - The input filesystem path containing environment variables to be expanded. |
| result< std::string > oxy::expandEnvVar_fn::operator() | ( | std::string const & | source | ) | const |
| source | - The input string containing environment variables to be expanded. |