cpp-mate  0.7
Helpful library for C++.
CppMate::Path Class Referencefinal

Represents path. More...

#include <Path.hpp>

Public Member Functions

 Path (const std::string &path)
 Constructor. More...
 
bool isAbsolute () const
 Indicates that path is absolute. More...
 
bool hasTrailingSlash () const
 Indicates that path has trailing slash. More...
 
std::string getPath () const
 Returns orginal string representation of the path. More...
 
std::string getParent () const
 Returns path without name. More...
 
std::string getName () const
 Returns name without path with suffix. More...
 
std::string getBaseName () const
 Returns base name without path and suffix. More...
 
std::string getSuffix () const
 Returns suffix of name. More...
 
std::string getDriveLetter () const
 Returns drive letter if present or empty string otherwise. More...
 
std::vector< std::string >::const_iterator begin () const
 Returns begin iterator. More...
 
std::vector< std::string >::const_iterator end () const
 Returns end iterator. More...
 

Detailed Description

Represents path.

Constructor & Destructor Documentation

◆ Path()

CppMate::Path::Path ( const std::string &  path)
explicit

Constructor.

Parameters
paththe source path.

Member Function Documentation

◆ begin()

std::vector<std::string>::const_iterator CppMate::Path::begin ( ) const
inline

Returns begin iterator.

Returns
begin iterator.

◆ end()

std::vector<std::string>::const_iterator CppMate::Path::end ( ) const
inline

Returns end iterator.

Returns
end iterator.

◆ getBaseName()

std::string CppMate::Path::getBaseName ( ) const
inline

Returns base name without path and suffix.

Returns
base name.

◆ getDriveLetter()

std::string CppMate::Path::getDriveLetter ( ) const
inline

Returns drive letter if present or empty string otherwise.

Returns
driver letter.

◆ getName()

std::string CppMate::Path::getName ( ) const
inline

Returns name without path with suffix.

Returns
name without path with suffix.

◆ getParent()

std::string CppMate::Path::getParent ( ) const
inline

Returns path without name.

Returns
path without name.

◆ getPath()

std::string CppMate::Path::getPath ( ) const
inline

Returns orginal string representation of the path.

Returns
string representation of the path.

◆ getSuffix()

std::string CppMate::Path::getSuffix ( ) const
inline

Returns suffix of name.

Returns
suffix of name.

◆ hasTrailingSlash()

bool CppMate::Path::hasTrailingSlash ( ) const
inline

Indicates that path has trailing slash.

Returns
true if path has trailing slash; false otherwise.

◆ isAbsolute()

bool CppMate::Path::isAbsolute ( ) const
inline

Indicates that path is absolute.

Returns
true if path is absolute; false otherwise.

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