Path Class Reference
[System]

Utility for working with filenames and file paths. More...

#include <Path.hpp>

List of all members.

Static Public Member Functions

static string build (const string &root, vector< string > &parts)
static string expand (const string &path)
static string getBasename (const string &path)
static string getDirname (const string &path)
static string getExtension (const string &path)
static string getInternals (const string &path)
static string getRelativePath (const string &base, const string &filename)
static string getRoot (const string &path)
static bool hasWindowsRoot (const string &token)
static bool isAbsolutePath (const string &filename)
static bool isSeparator (char character)
static bool isWindowsRoot (const string &token)
static string mergePaths (const string &root, vector< string > &base, vector< string > &change)
static string stripRoot (const string &path)
static void tokenize (const string &filename, vector< string > &tokens)

Detailed Description

Utility for working with filenames and file paths.


Member Function Documentation

string build ( const string &  root,
vector< string > &  parts 
) [static]

Builds a path from its parts prepended by root.

string expand ( const string &  path  )  [static]
Returns:
String with environment variables in path replaced.
string getBasename ( const string &  path  )  [static]
Returns:
filename part from a path.
string getDirname ( const string &  path  )  [static]
Returns:
directory part from a path.
string getExtension ( const string &  path  )  [static]
Returns:
Text after the last '.' in path.
string getInternals ( const string &  path  )  [static]
Returns:
directories between root and filename.
string getRelativePath ( const string &  primary,
const string &  secondary 
) [static]

Makes a filename relative to another path.

Parameters:
primary Path used as the base.
secondary Relative path to modify primary.
Exceptions:
Exception if either of the paths are empty.
string getRoot ( const string &  path  )  [static]
Returns:
top-most directory from a path.
bool hasWindowsRoot ( const string &  token  )  [static]
Returns:
true if the path starts with a drive letter and a colon.
bool isAbsolutePath ( const string &  filename  )  [static]
Returns:
true if the filename is an absolute path.
bool isSeparator ( char  character  )  [static]
Returns:
true if the character is a forward slash or backslash.
bool isWindowsRoot ( const string &  token  )  [static]
Returns:
true if the token is a drive letter followed by a colon.
string mergePaths ( const string &  root,
vector< string > &  path,
vector< string > &  change 
) [static]

Merges a relative path with a base path.

Parameters:
root Top-most directory
path Base path
change Relative path
Exceptions:
Exception if the relative path goes above root.
string stripRoot ( const string &  path  )  [static]

Removes the top-most directory from a path.

void tokenize ( const string &  filename,
vector< string > &  tokens 
) [static]

Splits filename up into tokens.


The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:36 2010 for Gander by  doxygen 1.6.3