Public Member Functions |
| path (const std::string &s, bool x_undisclosed=false) |
| constructor from a string
|
| path (const char *s, bool x_undisclosed=false) |
| constructor from a char *
|
| path (const path &ref) |
| copy constructor
|
const path & | operator= (const path &ref) |
| assignment operator
|
bool | operator== (const path &ref) const |
| comparison operator
|
std::string | basename () const |
| get the basename of a path
|
void | reset_read () |
| reset the read_subdir operation
|
bool | read_subdir (std::string &r) |
| sequentially read the elements that compose the path
|
bool | is_relative () const |
| whether the path is relative or absolute (= start with a /)
|
bool | is_absolute () const |
| whether the path is absolute or relative
|
bool | is_undisclosed () const |
| whether the path has an undisclosed part at the beginning
|
bool | pop (std::string &arg) |
| remove and gives in argument the basename of the path
|
bool | pop_front (std::string &arg) |
| remove and gives in argument the outer most member of the path
|
path | operator+ (const path &arg) const |
| add a path to the current path. The added path must be a relative path
|
path & | operator+= (const path &arg) |
| add a path to the current path. The added path must be a relative path
|
bool | is_subdir_of (const path &p, bool case_sensit) const |
| test whether the current object is a subdir of the method's argument
|
std::string | display () const |
| convert back a path to a string
|
unsigned int | degre () const |
| returns the number of member in the path
|
void | explode_undisclosed () const |
| if the current object is an undisclosed path, tries to convert it back to normal path
|
the class path is here to manipulate paths in the Unix notation: using'/'
several operations are provided as well as convertion functions, but for the API user, it can be used as if it was a std::string object. However if the argument is not a valid path, an exception may be thrown by libdar
Definition at line 50 of file path.hpp.