#include <path.hpp>
Public Member Functions | |
| path (const std::string &s) | |
| constructor from a string | |
| path (const char *s) | |
| constructor from a char * | |
| path (const path &ref) | |
| copy constructor | |
| path & | operator= (const path &ref) |
| assignment operator | |
| bool | operator== (const path &ref) const |
| comparison operator | |
| std::string | basename () const |
| this function returns the basename that's it the right most member of a path | |
| void | reset_read () |
| reset for read_subdir. next call to read_subdir is the most global | |
| 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 | 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 |
| the returned string is the representation of the current object in Unix notation | |
| unsigned int | degre () const |
| returns the number of member in the path | |
several operations are provided as well as convertion functions
Definition at line 48 of file path.hpp.
| libdar::path::path | ( | const std::string & | s | ) |
constructor from a string
This realizes the string to path convertion function
Referenced by path().
| libdar::path::path | ( | const char * | s | ) | [inline] |
| unsigned int libdar::path::degre | ( | ) | const [inline] |
| bool libdar::path::is_subdir_of | ( | const path & | p, | |
| bool | case_sensit | |||
| ) | const |
test whether the current object is a subdir of the method's argument
| [in] | p | the path to test with |
| [in] | case_sensit | whether the test must be in case sensitive manner or not |
add a path to the current path. The added path *must* be a relative path
| [in] | arg | the relative path to add |
add a path to the current path. The added path *must* be a relative path
| [in] | arg | the relative path to add |
| bool libdar::path::pop | ( | std::string & | arg | ) |
remove and gives in argument the basename of the path
| [out] | arg | the basename of the path |
| bool libdar::path::pop_front | ( | std::string & | arg | ) |
remove and gives in argument the outer most member of the path
| [out] | arg | the value of the outer element of the path |
| bool libdar::path::read_subdir | ( | std::string & | r | ) |
sequentially read the elements that compose the path
| [out] | r | the next element of the path |
1.4.7