rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
Path utils

Functions

vector< string > Rivet::pathsplit (const string &path)
 Split a path string with colon delimiters.
 
string Rivet::pathjoin (const vector< string > &paths)
 Join several filesystem paths together with the standard ':' delimiter.
 
string Rivet::operator/ (const string &a, const string &b)
 Operator for joining strings a and b with filesystem separators.
 
string Rivet::basename (const string &p)
 Get the basename (i.e. terminal file name) from a path p.
 
string Rivet::dirname (const string &p)
 Get the dirname (i.e. path to the penultimate directory) from a path p.
 
string Rivet::file_stem (const string &f)
 Get the stem (i.e. part without a file extension) from a filename f.
 
string Rivet::file_extn (const string &f)
 Get the file extension from a filename f.
 

Detailed Description

Function Documentation

◆ pathjoin()

string Rivet::pathjoin ( const vector< string > &  paths)
inline

Join several filesystem paths together with the standard ':' delimiter.

Note that this does NOT join path elements together with a platform-portable directory delimiter, cf. the Python {os.path.join}!

References Rivet::join().

◆ pathsplit()

vector< string > Rivet::pathsplit ( const string &  path)
inline

Split a path string with colon delimiters.

Ignores zero-length substrings. Designed for getting elements of filesystem paths, naturally.

References Rivet::split().