AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
path Class Reference

Inherits vector< std::string >.

Public Member Functions

template<class String >
 path (String const &p)
 
template<class InputIt >
 path (InputIt it, InputIt end_it)
 
template<class String >
 path (std::initializer_list< String > const &list)
 
pathremove_filename ()
 Removes filename path component.
 
path parent_path () const
 Returns the path of the parent path.
 
path filename () const
 Returns filename path component.
 
path stem () const
 Returns the stem path component.
 
path extension () const
 Returns the file extension path component.
 
std::string string () const
 Return the path as string.
 
bool is_absolute () const
 
bool is_relative () const
 
bool is_file () const
 Check whether path is a regular file.
 
bool is_directory () const
 Check whether path is a regular file.
 
bool operator== (path const &p)
 Lexicographically compares two paths.
 
pathoperator/= (path const &p)
 Appends elements to the path.
 

Static Public Member Functions

static bool is_absolute (std::string p)
 Return whether a path is an absolute path. More...
 

Static Public Attributes

static constexpr char preferred_separator = '/'
 

Protected Member Functions

void split (std::string p)
 

Friends

template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &out, path const &p)
 output of the path
 

Member Function Documentation

◆ is_absolute()

bool is_absolute ( std::string  p)
static

Return whether a path is an absolute path.

In Linux, test whether the path starts with /, in Windows whether it starts with [a-z]:\\.


The documentation for this class was generated from the following files: