C++ Utils  0.1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes
utils::Path Class Reference

#include <path.h>

List of all members.

Public Member Functions

 Path ()
 Path (const char *path)
 Path (const std::string &path)
 operator std::string () const
std::string basename () const
std::string dirname () const
Path dir () const
bool exists () const
Path operator+ (const Path &other) const

Static Public Member Functions

static const char * separator ()
static const char * separators ()

Static Public Attributes

static const char SEPARATOR = '\\'

Detailed Description

Manipulates file/directory names and paths


Constructor & Destructor Documentation

utils::Path::Path ( ) [inline]
utils::Path::Path ( const char *  path) [inline]
utils::Path::Path ( const std::string &  path) [inline]

Member Function Documentation

std::string utils::Path::basename ( ) const [inline]
Returns:
The basename of the path
Path utils::Path::dir ( ) const [inline]
Returns:
The directory of the path
std::string utils::Path::dirname ( ) const [inline]
Returns:
The directory name of the path
bool utils::Path::exists ( ) const [inline]
Returns:
True of the path is a file/directory
utils::Path::operator std::string ( ) const [inline]
Returns:
The string representing the current path
Path utils::Path::operator+ ( const Path other) const [inline]

Joins two paths

Parameters:
otherThe path that should be appended (has to be relative)
Returns:
A path where other is appended to the current path
static const char* utils::Path::separator ( ) [inline, static]
static const char* utils::Path::separators ( ) [inline, static]
Returns:
A string containing all possible separators

Member Data Documentation

const char utils::Path::SEPARATOR = '\\' [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines