TSDuck v3.41-4250
MPEG Transport Stream Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages Concepts
tsEnvironment.h File Reference

Accessing environment variables. More...

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Typedefs

using ts::Environment = std::map< UString, UString >
 Define a container type holding all environment variables.
 

Functions

bool ts::DeleteEnvironment (const UString &name)
 Delete an environment variable.
 
bool ts::EnvironmentExists (const UString &varname)
 Check if an environment variable exists.
 
UString ts::ExpandEnvironment (const UString &path)
 Expand environment variables inside a file path (or any string).
 
UString ts::GetEnvironment (const UString &varname, const UString &defvalue=UString())
 Get the value of an environment variable.
 
void ts::GetEnvironment (Environment &env)
 Get the content of the entire environment (all environment variables).
 
template<class CONTAINER >
void ts::GetEnvironmentPath (CONTAINER &container, const UString &name, const UString &def=UString())
 Get the value of an environment variable containing a search path.
 
template<class CONTAINER >
void ts::GetEnvironmentPathAppend (CONTAINER &container, const UString &name, const UString &def=UString())
 Get the value of an environment variable containing a search path.
 
bool ts::LoadEnvironment (Environment &env, const UString &fileName)
 Load a text file containing environment variables.
 
bool ts::SetEnvironment (const UString &name, const UString &value)
 Set the value of an environment variable.
 
template<class CONTAINER >
void ts::SetEnvironmentPath (const UString &name, const CONTAINER &container)
 Set the value of an environment variable containing a search path.
 

Variables

constexpr const UCharts::PATH_ENVIRONMENT_VARIABLE = platform - specific("PATH", "Path")
 Environment variable containing the command search path.
 
constexpr const UCharts::PLUGINS_PATH_ENVIRONMENT_VARIABLE = u"TSPLUGINS_PATH"
 Name of the environment variable which contains a list of paths for plugins.
 
constexpr UChar ts::SEARCH_PATH_SEPARATOR = platform-specific (':', ';')
 Separator character in search paths.
 

Detailed Description

Accessing environment variables.