My Project
SallyAPI::String::PathHelper Class Reference

Path helper. More...

#include <PathHelper.h>

List of all members.

Static Public Member Functions

static std::string CorrectFileName (const std::string &str)
 Removes not allowed characters from the file name. Not working with absolute paths. The not allowed characters are replaced with "-".
static std::string CorrectPath (const std::string &sPath)
 Adds a "\" to the end if it is missing.
static std::string GetDirectoryFromPath (const std::string &sFile)
 Gets a directory from the given absolute file name.
static std::string GetUpperDirectory (const std::string &sFile)
 Gets the parent directory.
static std::string GetFileFromPath (const std::string &str, const std::string sep="\\")
 Gets the file name of the given absolute file name.
static void CreateRecursiveDirectory (const std::string &str)
 Creates the directory structure recursively.
static std::string GetShortFilename (const std::string &filename)

Detailed Description

Path helper.

Author:
Christian Knobloch
Date:
19.04.2010

Member Function Documentation

std::string PathHelper::CorrectFileName ( const std::string &  str) [static]

Removes not allowed characters from the file name. Not working with absolute paths. The not allowed characters are replaced with "-".

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strThe string.
Returns:
The corrected string.
std::string PathHelper::CorrectPath ( const std::string &  sPath) [static]

Adds a "\" to the end if it is missing.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sPathFull pathname of the file.
Returns:
.
void PathHelper::CreateRecursiveDirectory ( const std::string &  str) [static]

Creates the directory structure recursively.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strThe string.
std::string PathHelper::GetDirectoryFromPath ( const std::string &  sFile) [static]

Gets a directory from the given absolute file name.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sFileThe file.
Returns:
The directory from file.
std::string PathHelper::GetFileFromPath ( const std::string &  str,
const std::string  sep = "\\" 
) [static]

Gets the file name of the given absolute file name.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strThe string.
sepThe sep.
Returns:
The file from folder string.
std::string PathHelper::GetShortFilename ( const std::string &  filename) [static]
std::string PathHelper::GetUpperDirectory ( const std::string &  sFile) [static]

Gets the parent directory.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sFileThe file.
Returns:
The upper directory.

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