#include <Pathname.h>
Public Member Functions | |
| Pathname () | |
| Default ctor: an empty path. | |
| Pathname (const std::string &name_tv) | |
| Ctor from string. | |
| Pathname (const char *name_tv) | |
| Ctor from char*. | |
| Pathname & | operator= (const Pathname &path_tv) |
| Assign. | |
| Pathname & | operator/= (const Pathname &path_tv) |
| Concatenate and assing. | |
| Pathname & | operator+= (const Pathname &path_tv) |
| Concatenate and assing. | |
| const std::string & | asString () const |
| String representation. | |
| const char * | c_str () const |
| String representation. | |
| bool | empty () const |
| Test for an empty path. | |
| bool | absolute () const |
| Test for an absolute path. | |
| bool | relative () const |
| Test for a relative path. | |
| Pathname | dirname () const |
| Return all but the last component od this path. | |
| std::string | basename () const |
| Return the last component of this path. | |
| std::string | extension () const |
| Return all of the characters in name after and including the last dot in the last element of name. | |
| Pathname | absolutename () const |
| Return this path, adding a leading '/' if relative. | |
| Pathname | relativename () const |
| Return this path, removing a leading '/' if absolute. | |
| Pathname | cat (const Pathname &r) const |
| Concatenation of pathnames. | |
| Pathname | extend (const std::string &r) const |
| Append string r to the last component of the path. | |
Static Public Member Functions | |
| static Pathname | dirname (const Pathname &name_tv) |
| static std::string | basename (const Pathname &name_tv) |
| static std::string | extension (const Pathname &name_tv) |
| static Pathname | absolutename (const Pathname &name_tv) |
| static Pathname | relativename (const Pathname &name_tv) |
| static Pathname | cat (const Pathname &l, const Pathname &r) |
| static Pathname | extend (const Pathname &l, const std::string &r) |
Private Member Functions | |
| void | _assign (const std::string &name_tv) |
Private Attributes | |
| std::string::size_type | prfx_i |
| std::string | name_t |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (const Pathname &l, const Pathname &r) |
| bool | operator!= (const Pathname &l, const Pathname &r) |
| Pathname | operator/ (const Pathname &l, const Pathname &r) |
| Concatenate two Pathname. | |
| Pathname | operator+ (const Pathname &l, const Pathname &r) |
| Concatenate two Pathname. | |
| std::ostream & | operator<< (std::ostream &str, const Pathname &obj) |
| Stream output. | |
Definition at line 42 of file Pathname.h.
| zypp::filesystem::Pathname::Pathname | ( | ) | [inline] |
| zypp::filesystem::Pathname::Pathname | ( | const std::string & | name_tv | ) | [inline] |
| zypp::filesystem::Pathname::Pathname | ( | const char * | name_tv | ) | [inline] |
Concatenate and assing.
Definition at line 73 of file Pathname.h.
References cat().
| const std::string& zypp::filesystem::Pathname::asString | ( | ) | const [inline] |
String representation.
Definition at line 77 of file Pathname.h.
References name_t.
Referenced by zypp::filesystem::assert_dir(), zypp::filesystem::PathInfo::asString(), basename(), cat(), zypp::filesystem::checksum(), zypp::filesystem::chmod(), zypp::filesystem::copy(), zypp::filesystem::copy_dir(), zypp::filesystem::copy_dir_content(), zypp::filesystem::copy_file2dir(), zypp::filesystem::hardlink(), zypp::filesystem::is_empty_dir(), zypp::filesystem::md5sum(), zypp::filesystem::mkdir(), operator!=(), zypp::filesystem::PathInfo::operator()(), operator<<(), operator==(), zypp::filesystem::rename(), zypp::filesystem::symlink(), zypp::filesystem::TmpDir::TmpDir(), zypp::filesystem::TmpFile::TmpFile(), and zypp::filesystem::zipType().
| const char* zypp::filesystem::Pathname::c_str | ( | ) | const [inline] |
| bool zypp::filesystem::Pathname::empty | ( | ) | const [inline] |
Test for an empty path.
Definition at line 85 of file Pathname.h.
References name_t.
Referenced by absolute(), zypp::filesystem::assert_dir(), basename(), cat(), dirname(), extension(), zypp::filesystem::PathInfo::operator()(), relative(), and zypp::filesystem::TmpPath::Impl::~Impl().
| bool zypp::filesystem::Pathname::absolute | ( | ) | const [inline] |
Test for an absolute path.
Definition at line 87 of file Pathname.h.
References empty(), name_t, and prfx_i.
Referenced by relativename().
| bool zypp::filesystem::Pathname::relative | ( | ) | const [inline] |
Test for a relative path.
Definition at line 89 of file Pathname.h.
References empty(), name_t, and prfx_i.
Referenced by absolutename(), and zypp::filesystem::assert_dir().
| Pathname zypp::filesystem::Pathname::dirname | ( | ) | const [inline] |
| std::string zypp::filesystem::Pathname::basename | ( | ) | const [inline] |
Return the last component of this path.
Definition at line 96 of file Pathname.h.
Referenced by zypp::filesystem::copy_dir(), and extension().
| string zypp::filesystem::Pathname::basename | ( | const Pathname & | name_tv | ) | [static] |
| std::string zypp::filesystem::Pathname::extension | ( | ) | const [inline] |
Return all of the characters in name after and including the last dot in the last element of name.
If there is no dot in the last element of name then returns the empty string.
Definition at line 103 of file Pathname.h.
| string zypp::filesystem::Pathname::extension | ( | const Pathname & | name_tv | ) | [static] |
| Pathname zypp::filesystem::Pathname::absolutename | ( | ) | const [inline] |
| Pathname zypp::filesystem::Pathname::relativename | ( | ) | const [inline] |
Concatenation of pathnames.
"foo" / "baa" ==> "foo/baa" "foo/" / "baa" ==> "foo/baa" "foo" / "/baa" ==> "foo/baa" "foo/" / "/baa" ==> "foo/baa"
Definition at line 124 of file Pathname.h.
Referenced by absolutename(), operator+(), operator+=(), operator/(), operator/=(), and relativename().
| Pathname zypp::filesystem::Pathname::extend | ( | const std::string & | r | ) | const [inline] |
Append string r to the last component of the path.
"foo/baa".extend( ".h" ) ==> "foo/baa.h"
Definition at line 132 of file Pathname.h.
| static Pathname zypp::filesystem::Pathname::extend | ( | const Pathname & | l, | |
| const std::string & | r | |||
| ) | [static] |
| void zypp::filesystem::Pathname::_assign | ( | const std::string & | name_tv | ) | [private] |
Referenced by Pathname().
Concatenate two Pathname.
Definition at line 158 of file Pathname.h.
References cat().
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const Pathname & | obj | |||
| ) | [related] |
std::string::size_type zypp::filesystem::Pathname::prfx_i [private] |
Definition at line 136 of file Pathname.h.
Referenced by absolute(), basename(), dirname(), operator=(), and relative().
std::string zypp::filesystem::Pathname::name_t [private] |
Definition at line 137 of file Pathname.h.
Referenced by absolute(), asString(), c_str(), dirname(), empty(), operator=(), and relative().
1.5.0