17 #ifndef CPP_MATE_PATH_HPP
18 #define CPP_MATE_PATH_HPP
36 explicit Path(
const std::string& path);
54 std::string
getPath()
const {
return _path; }
66 std::string
getName()
const {
return _name; }
90 std::vector<std::string>::const_iterator
begin()
const {
return _parts.begin(); }
96 std::vector<std::string>::const_iterator
end()
const {
return _parts.end(); }
100 bool _hasTrailingSlash;
104 std::string _baseName;
106 std::string _driveLetter;
107 std::vector<std::string> _parts;
Represents path.
Definition: Path.hpp:29
std::string getParent() const
Returns path without name.
Definition: Path.hpp:60
bool hasTrailingSlash() const
Indicates that path has trailing slash.
Definition: Path.hpp:48
std::string getPath() const
Returns orginal string representation of the path.
Definition: Path.hpp:54
Path(const std::string &path)
Constructor.
std::vector< std::string >::const_iterator end() const
Returns end iterator.
Definition: Path.hpp:96
std::string getName() const
Returns name without path with suffix.
Definition: Path.hpp:66
std::string getDriveLetter() const
Returns drive letter if present or empty string otherwise.
Definition: Path.hpp:84
std::vector< std::string >::const_iterator begin() const
Returns begin iterator.
Definition: Path.hpp:90
bool isAbsolute() const
Indicates that path is absolute.
Definition: Path.hpp:42
std::string getSuffix() const
Returns suffix of name.
Definition: Path.hpp:78
std::string getBaseName() const
Returns base name without path and suffix.
Definition: Path.hpp:72
Definition: BinaryData.hpp:28