Torque::Path Class Reference

#include <path.h>

List of all members.


Detailed Description

FileSystem filename representation.

Filenames has the following form: "root:path/file.ext"


Public Types

 OsSeparator = '/'
enum  Separator { OsSeparator = '/' }

Public Member Functions

 Path ()
 Path (const char *file)
 Path (const String &file)
Pathoperator= (const String &file)
 operator String () const
bool operator== (const Path &path) const
String getRoot () const
String getPath () const
String getFileName () const
String getExtension () const
String getFullFileName () const
String getFullPath () const
String setRoot (const String &s)
String setPath (const String &s)
String setFileName (const String &s)
String setExtension (const String &s)
U32 getDirectoryCount () const
String getDirectory (U32) const
bool isDirectory () const
bool isRelative () const
bool isAbsolute () const
bool appendPath (const Path path)
 Appends the argument's path component to the object's path component.

Static Public Member Functions

static String Join (const String &, String::ValueType, const String &)
 Join two path or file name components together.
static String CleanSeparators (String path)
 Replace all '\' with '/'.
static String CompressPath (String path)
 Remove "." and ".." relative paths.
static String MakeRelativePath (String makeRelative, String relativeTo)
 Take two paths and return the relative path between them.

Private Member Functions

void _split (String name)
String _join () const

Private Attributes

String mRoot
String mPath
String mFile
String mExt
String mFullFileName
String mFullPath
bool mIsDirtyFileName
bool mIsDirtyPath


Member Enumeration Documentation

Enumerator:
OsSeparator 


Constructor & Destructor Documentation

Torque::Path::Path (  )  [inline]

Torque::Path::Path ( const char *  file  )  [inline]

Torque::Path::Path ( const String file  )  [inline]


Member Function Documentation

Path& Torque::Path::operator= ( const String file  )  [inline]

Torque::Path::operator String (  )  const [inline]

bool Torque::Path::operator== ( const Path path  )  const [inline]

static String Torque::Path::Join ( const String ,
String::ValueType  ,
const String  
) [static]

Join two path or file name components together.

static String Torque::Path::CleanSeparators ( String  path  )  [static]

Replace all '\' with '/'.

static String Torque::Path::CompressPath ( String  path  )  [static]

Remove "." and ".." relative paths.

static String Torque::Path::MakeRelativePath ( String  makeRelative,
String  relativeTo 
) [static]

Take two paths and return the relative path between them.

String Torque::Path::getRoot (  )  const [inline]

String Torque::Path::getPath (  )  const [inline]

String Torque::Path::getFileName (  )  const [inline]

String Torque::Path::getExtension (  )  const [inline]

String Torque::Path::getFullFileName (  )  const

String Torque::Path::getFullPath (  )  const

String Torque::Path::setRoot ( const String s  ) 

String Torque::Path::setPath ( const String s  ) 

String Torque::Path::setFileName ( const String s  ) 

String Torque::Path::setExtension ( const String s  ) 

U32 Torque::Path::getDirectoryCount (  )  const

String Torque::Path::getDirectory ( U32   )  const

bool Torque::Path::isDirectory (  )  const

bool Torque::Path::isRelative (  )  const

bool Torque::Path::isAbsolute (  )  const

bool Torque::Path::appendPath ( const Path  path  ) 

Appends the argument's path component to the object's path component.

The object's root, filename and extension are unaffected.

void Torque::Path::_split ( String  name  )  [private]

String Torque::Path::_join (  )  const [private]


Member Data Documentation

String Torque::Path::mFullFileName [mutable, private]

String Torque::Path::mFullPath [mutable, private]

bool Torque::Path::mIsDirtyPath [mutable, private]