SvnCpp
|
#include <path.hpp>
Public Member Functions | |
Path (const std::string &path="") | |
Path (const char *path) | |
Path (const Path &path) | |
Path & | operator= (const Path &) |
bool | operator== (const Path &) const |
const std::string & | path () const |
const char * | c_str () const |
bool | isSet () const |
bool | isUrl () const |
void | addComponent (const char *component) |
void | addComponent (const std::string &component) |
void | split (std::string &dirpath, std::string &basename) const |
void | split (std::string &dir, std::string &filename, std::string &ext) const |
std::string | basename () const |
std::string | dirpath () const |
std::string | substr (const size_t index) const |
std::string | unescape () const |
size_t | length () const |
std::string | native () const |
Static Public Member Functions | |
static Path | getTempDir () |
Encapsulation for Subversion Path handling
svn::Path::Path | ( | const std::string & | path = "" | ) |
Constructor that takes a string as parameter. The string is converted to subversion internal representation. The string is copied.
path | Path string |
References path().
Referenced by operator=(), svn::RepositoryPath::operator=(), operator==(), svn::RepositoryPath::operator==(), Path(), svn::RepositoryPath::RepositoryPath(), svn::RepositoryPath::RepositoryPath(), svn::RepositoryPath::RepositoryPath(), and unescape().
svn::Path::Path | ( | const char * | path | ) |
svn::Path::Path | ( | const Path & | path | ) |
void svn::Path::addComponent | ( | const char * | component | ) |
adds a new URL component to the path
component | new component to add |
void svn::Path::addComponent | ( | const std::string & | component | ) |
adds a new URL component to the path
component | new component to add |
std::string svn::Path::basename | ( | ) | const |
const char * svn::Path::c_str | ( | ) | const |
std::string svn::Path::dirpath | ( | ) | const |
|
static |
returns the temporary directory
bool svn::Path::isSet | ( | ) | const |
check whether a path is set. Right now this checks only if the string is non- empty.
bool svn::Path::isUrl | ( | ) | const |
shows whether we have a path or url
size_t svn::Path::length | ( | ) | const |
return the length of the path-string
std::string svn::Path::native | ( | ) | const |
returns the path with native separators
const std::string & svn::Path::path | ( | ) | const |
void svn::Path::split | ( | std::string & | dir, |
std::string & | filename, | ||
std::string & | ext ) const |
split path in its components including file extension
dir | directory component |
filename | filename |
ext | extension (including leading dot ".") |
void svn::Path::split | ( | std::string & | dirpath, |
std::string & | basename ) const |
split path in its components
dirpath | directory/path component |
basename | filename |
References basename(), and dirpath().
std::string svn::Path::substr | ( | const size_t | index | ) | const |
get a substring of a path, starting at index
index |
std::string svn::Path::unescape | ( | ) | const |