Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::FoundationUtils Namespace Reference

Functions

bool CanConvertEnvValueToBool (const std::string &value)
 
bool ConvertEnvValueToBool (const std::string &value)
 
void ConvertToUnixPath (std::string &Path)
 Transforms a file path by replacing its backslashes with slashes.
 
std::string GetCurrentDir ()
 
const char & GetEnvPathSeparator ()
 
const std::string & GetEtcDir ()
 
const std::string & GetFallbackRootSys ()
 
const std::string & GetIncludeDir ()
 \ returns the include directory in the installation.
 
const std::string & GetPathSeparator ()
 
const std::string & GetRootSys ()
 
std::string MakePathRelative (const std::string &path, const std::string &base, bool isBuildingROOT=false)
 
static std::string str_tolower (std::string s)
 

Function Documentation

◆ CanConvertEnvValueToBool()

bool ROOT::FoundationUtils::CanConvertEnvValueToBool ( const std::string &  value)
Returns
true if lowercase value is 1, on, true, 0, off, false

Definition at line 188 of file FoundationUtils.cxx.

◆ ConvertEnvValueToBool()

bool ROOT::FoundationUtils::ConvertEnvValueToBool ( const std::string &  value)
Returns
true if the lowercase string is 1, on, true; false if 0, off, false

Definition at line 198 of file FoundationUtils.cxx.

◆ ConvertToUnixPath()

void ROOT::FoundationUtils::ConvertToUnixPath ( std::string &  Path)

Transforms a file path by replacing its backslashes with slashes.

Definition at line 97 of file FoundationUtils.cxx.

◆ GetCurrentDir()

std::string ROOT::FoundationUtils::GetCurrentDir ( )
Returns
the $PWD.

Definition at line 37 of file FoundationUtils.cxx.

◆ GetEnvPathSeparator()

const char & ROOT::FoundationUtils::GetEnvPathSeparator ( )
inline
Returns
the path separator for the PATH environment variable on the platform.

Definition at line 54 of file FoundationUtils.hxx.

◆ GetEtcDir()

const std::string & ROOT::FoundationUtils::GetEtcDir ( )
Returns
the sysconfig directory in the installation.

Definition at line 169 of file FoundationUtils.cxx.

◆ GetFallbackRootSys()

const std::string & ROOT::FoundationUtils::GetFallbackRootSys ( )
Returns
the fallback directory in the installation (eg. /usr/local/root/).

Definition at line 101 of file FoundationUtils.cxx.

◆ GetIncludeDir()

const std::string & ROOT::FoundationUtils::GetIncludeDir ( )

\ returns the include directory in the installation.

Definition at line 154 of file FoundationUtils.cxx.

◆ GetPathSeparator()

const std::string & ROOT::FoundationUtils::GetPathSeparator ( )
inline
Returns
the path separator slash or backslash depending on the platform.

Definition at line 43 of file FoundationUtils.hxx.

◆ GetRootSys()

const std::string & ROOT::FoundationUtils::GetRootSys ( )
Returns
the rootsys directory in the installation.

Definition at line 132 of file FoundationUtils.cxx.

◆ MakePathRelative()

std::string ROOT::FoundationUtils::MakePathRelative ( const std::string &  path,
const std::string &  base,
bool  isBuildingROOT = false 
)
Returns
the relative path of path with respect to base. For instance, for path being "/a/b/c/d" and base "/a/b", returns "c/d".
Parameters
path- the input path
base- the base path to be removed from path.
isBuildingROOT- if true, it converts module directories such as core/base/inc/ to include/

Definition at line 72 of file FoundationUtils.cxx.

◆ str_tolower()

static std::string ROOT::FoundationUtils::str_tolower ( std::string  s)
static

Definition at line 182 of file FoundationUtils.cxx.