ADTF  3.18.2
cFilename

File name class. More...

Inheritance diagram for cFilename:
[legend]

Public Member Functions

 cFilename ()
 Constructor that initializes an empty cFilename object.
 
 cFilename (const cFilename &oFilename)
 Constructor that initializes the object with an existing cFilename object. More...
 
cFilenameoperator= (const cFilename &i_oOther)
 Copy assignment operator. More...
 
 cFilename (const cString &strString)
 Constructor that initializes the filename with an existing cString object. More...
 
 cFilename (const tChar *pString)
 Constructor that initializes the filename with a null-terminated string. More...
 
 cFilename (char cChar)
 Constructor that initializes the filename with a single character. More...
 
 cFilename (cFilename &&i_oOther)
 Implements move construction. More...
 
cFilenameoperator= (cFilename &&i_oOther)
 Implements move assignment. More...
 
virtual ~cFilename ()
 Destructor.
 
cFilenameoperator= (tChar cChar)
 assigns a given string More...
 
cFilenameoperator= (const tChar *pString)
 assigns a given string More...
 
cFilenameoperator= (const cString &sString)
 assigns a given string More...
 
cFilename GetRoot () const
 This function extract the root component of a filename (without double point). More...
 
cFilename GetPath () const
 This function extract the path of the parent folder and/or the root component of a file/folder. More...
 
cString GetName () const
 This function extracts the name component of a filename. More...
 
cString GetNameWithoutExtension () const
 This function extract the name component of a filename. More...
 
cString GetExtension () const
 This function extract the extension of a filename. More...
 
cString GetDrive () const
 This function extracts the drive name of a filename (e.g. More...
 
tChar GetDriveLetter () const
 
cFilenameSetExtension (const cString &strExtension)
 This function changes the extension of a filename. More...
 
cFilenameAppendTrailingSlash ()
 This function appends a trailing slash to the filename if there isn't one, yet. More...
 
cFilenameRemoveTrailingSlash ()
 This function removes a trailing slash from the filename if there is one. More...
 
cFilenameMakeNativeSlashes ()
 This function changes all slashes to OS specific slashes. More...
 
cFilenameMakeBackwardSlashes ()
 This function changes all forward slashes to backslashes. More...
 
cFilenameMakeForwardSlashes ()
 This function changes all backslashes to forward slashes. More...
 
cFilename CreateRelativePath (const cFilename &strParent) const
 This function creates a relative path for this file regarding the given parent (Only works with native slashes!). More...
 
cFilename CreateAbsolutePath (const cFilename &strParent) const
 This function creates an absolute path for this file regarding the given parent (Only works with native slashes!). More...
 
tBool IsRelative () const
 This function checks the filename if it is relative. More...
 
tBool IsAbsolute () const
 This function checks the filename if it is absolute. More...
 
cFilenameAppendPath (const cFilename &strPath)
 Append a path string to current string. More...
 
cFilenameCleanPath ()
 This function resolves relative components ("." or "..") within an absolute path. More...
 
tVoid SplitPath (cStringList &List) const
 Split path into a string list. More...
 
- Public Member Functions inherited from string_base< cStackString >
 string_base ()
 Constructor that initializes an empty cStringA object.
 
 string_base (const _myType &strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (_myType &&strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (const string_base< T2 > &strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (const _StorageType &strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (const tChar &strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (const tChar *strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
 string_base (const tChar *strValue, tSize szLength)
 Constructor that initalizes an existing cString object with the spezified string value. More...
 
string_baseoperator= (const _myType &strValue)
 The cString assignment (=) operator assigns a new value to the existing cString object. More...
 
string_baseoperator= (_myType &&strValue)
 The cString assignment (=) operator assigns a new value to the existing cString object. More...
 
string_baseoperator= (const string_base< T2 > &strValue)
 Constructor that initalizes an existing cString object with the spezified string value.
 
string_baseoperator= (const _StorageType &strValue)
 The cString assignment (=) operator assigns a new value to the existing cString object. More...
 
string_baseoperator= (const tChar &strValue)
 The cString assignment (=) operator assigns a new value to the existing cString object. More...
 
string_baseoperator= (const tChar *strValue)
 The cString assignment (=) operator assigns a new value to the existing cString object. More...
 
virtual ~string_base ()
 Destructor.
 
iterator begin ()
 Iterator to beginning.
 
iterator end ()
 Iterator to end.
 
reverse_iterator rbegin ()
 Reverse iterator to beginning.
 
reverse_iterator rend ()
 Reverse iterator to end.
 
const_iterator cbegin () const
 Iterator to beginning.
 
const_iterator cend () const
 Iterator to end.
 
const_reverse_iterator crbegin () const
 Reverse iterator to beginning.
 
const_reverse_iterator crend () const
 Reverse iterator to end.
 
tVoid Clear ()
 Makes this cStringA object an empty string and frees memory as appropriate.
 
_myTypeSet (const _myType &strStringToSet, tSize nLength=InvalidPos)
 Assigns a new value to a cStringA object. More...
 
_myTypeSet (const tChar *pString, tSize nLength=InvalidPos)
 Assigns a new value to a cStringA object. More...
 
_myTypeSet (tChar c, tSize nCount)
 Assigns a new value to a cStringA object. More...
 
tSize GetLength () const
 This function returns the number of characters in a cStringA object. More...
 
tSize SetBuffer (tSize szSize)
 Sets or resizes the internal string buffer. More...
 
tSize GetBufferSize () const
 Get the size of the internal allocated string buffer. More...
 
tChar GetAt (tSize nIdx) const
 You can think of a cStringA object as an array of characters. More...
 
tVoid SetAt (tSize nIdx, tChar c)
 The SetAt member function sets a single character at a specified position. More...
 
const tCharoperator[] (tSize nIdx) const
 array access operator More...
 
tCharoperator[] (tSize nIdx)
 array access operator More...
 
tBool IsEmpty () const
 This function checks if the string object is empty. More...
 
tBool IsNotEmpty () const
 This function checks if the string object is not empty. More...
 
const tCharGetPtr () const
 This function returns the current string as an array of characters (c-style) More...
 
tCharGetBuffer ()
 This function returns the pointer to the data. More...
 
_myTypeAppend (const _myType &strString, tSize nLength=InvalidPos)
 This function appends a string to the end of the cStringA object. More...
 
_myTypeAppend (tChar c)
 This function appends one character to the end of the cStringA object. More...
 
_myTypeDelete (tSize nPos, tSize nLength=InvalidPos)
 This function deletes a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More...
 
_myTypeInsert (const _myType &strToInsertString, tSize nPos, tSize nLength=InvalidPos)
 This function inserts a string into the cStringA object. More...
 
_myTypeInsert (const tChar *pToInsertString, tSize nPos, tSize nLength=InvalidPos)
 This function inserts a string into the cStringA object. More...
 
tInt Compare (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const
 This function compares a cStringA object with another string using the generic-text function _tcscmp. More...
 
tInt Compare (const tChar *strString, tSize nPos=0, tSize nLength=InvalidPos) const
 This function compares a cStringA object with another string using the generic-text function _tcscmp. More...
 
tInt CompareNoCase (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const
 This function compares a cStringA object with another string using the generic-text function _tcsicmp. More...
 
tBool IsEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const
 This function checks if the two strings are equal (case sensitive) More...
 
tBool IsEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const
 This function checks if the two strings are equal (case insensitive) More...
 
tBool IsNotEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const
 This function checks if the two strings are not equal (case sensitive) More...
 
tBool IsNotEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const
 This function checks if the two strings are not equal (case insensitive) More...
 
tSize Find (const _myType &strStringToFind, tSize nStart=0, const tBool bNoCase=tFalse) const
 This function searches the cStringA object for the first match of a substring. More...
 
tSize Find (tChar cToFind, tSize nStart=0) const
 This function searches the cStringA object for the first match of the specified character. More...
 
tSize RFind (tChar cChar, tSize nStart=0) const
 This function searches the cStringA object for the last match of the specified character. More...
 
tSize FindToken (const _myType &strTokenList, tSize nStart=0) const
 This function searches a string for the first character that matches any character contained in a token list. More...
 
tSize FindNotToken (const _myType &strTokenList, tSize nStart=0) const
 This function searches a string for the first character that matches none of the characters contained in a token list. More...
 
tSize CountString (const _myType &strFind, tSize nStart=0) const
 This counts the occurrences of a given substring in a string. More...
 
tSize Replace (const _myType &strOld, const _myType &strNew, tBool bReplaceAll=tTrue)
 This function replaces one substring by another. More...
 
tSize Replace (tChar cOld, tChar cNew, tBool bReplaceAll=tTrue)
 This function replaces one character by another. More...
 
tSize Filter (tChar cChar)
 This function removes all occurrences of a given character from a string. More...
 
tSize Filter (const _myType &strCharList)
 This function removes all occurrences of each character given in a token list. More...
 
tBool StartsWith (const _myType &strStartsWith, const tBool bNoCase=tFalse) const
 This function checks if the string starts with a given prefix. More...
 
tSize RSplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const
 
tSize SplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const
 
tBool EndsWith (const _myType &strEndsWith, const tBool bNoCase=tFalse) const
 This function checks if the string ends with a given postfix. More...
 
 operator const tChar * () const
 This useful casting operator provides an efficient method to access the null- terminated C string contained in a cStringA object. More...
 
const _myTypeoperator+= (const _myType &strString)
 The += concatenation operator joins characters to the end of this string. More...
 
tBool operator== (const tChar *pString) const
 Checks if a string equals the cStringA object. More...
 
tBool operator== (const _myType &strString) const
 Checks if a string equals the cStringA object. More...
 
tBool operator!= (const tChar *pString) const
 Checks if a string does not equal the cStringA object. More...
 
tBool operator!= (const _myType &strString) const
 Checks if a string not equals the cStringA object. More...
 
tBool operator< (const tChar *pString) const
 Checks if a string is lexicographically greater than the cStringA object. More...
 
tBool operator< (const _myType &strString) const
 Checks if a string is lexicographically greater than the cStringA object. More...
 
tBool operator> (const tChar *pString) const
 Checks if a string is lexicographically smaller than the cStringA object. More...
 
tBool operator> (const _myType &strString) const
 Checks if a string is lexicographically smaller than the cStringA object. More...
 
tBool operator<= (const tChar *pString) const
 Checks if a string is lexicographically greater than or equal to the cStringA object. More...
 
tBool operator<= (const _myType &strString) const
 Checks if a string is lexicographically greater than or equal to the cStringA object. More...
 
tBool operator>= (const tChar *pString) const
 Checks if a string is lexicographically smaller than or equal to the cStringA object. More...
 
tBool operator>= (const _myType &strString) const
 Checks if a string is lexicographically smaller than or equal to the cStringA object. More...
 
_myType SubString (tSize nPos, tSize nLength=InvalidPos) const
 This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More...
 
_myType Mid (tSize nPos, tSize nLength=InvalidPos) const
 This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More...
 
_myType Left (tSize nLength) const
 Extracts the first (that is, leftmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More...
 
_myType Right (tSize nLength) const
 Extracts the last (that is, rightmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More...
 
tVoid Split (string_list_base< _myType > &lstSplittedResult, tChar cToken) const
 This function splits up a single cStringA object into several parts using a token character. More...
 
tVoid Split (string_list_base< _myType > &lstSplittedResult, const _myType &strToken) const
 This function splits up a single cStringA object into several parts using a token string. More...
 
tVoid SplitToken (string_list_base< _myType > &lstList, const _myType &strTokenList) const
 Split string using a token list. More...
 
tVoid Trim ()
 This function removes leading and trailing whitespace characters from a cStringA object. More...
 
tVoid LeftTrim (tBool bNumTrim=tFalse)
 This function removes leading whitespace characters or leading zero characters from a cStringA object. More...
 
tVoid RightTrim ()
 This function removes trailing whitespace characters from a cStringA object.
 
tVoid NumTrim ()
 This function removes whitespace and redundant zero characters from a cStringA object. More...
 
tVoid DropQuotes ()
 This function removes quotes from a cStringA object. More...
 
tVoid ToLower ()
 This function converts a cStringA object to a lowercase string. More...
 
tVoid ToUpper ()
 This function converts a cStringA object to an uppercase string. More...
 
_myTypeEscape ()
 Escape control characters. More...
 
_myTypeUnescape ()
 Escape control characters. More...
 
tBool IsInteger () const
 Check if string content represents an integer value. More...
 
tBool IsFloat () const
 Check if string content represents a floating point value. More...
 
tBool IsNumeric () const
 Check if string content represents a numeric value. More...
 
tInt32 AsInt32 () const
 This function converts the string to an integer value. More...
 
tVoid ToType (tInt32 &i32Value) const
 This function converts the string to an integer value. More...
 
tVoid ToType (tUInt32 &ui32Value) const
 This function converts the string to an integer value. More...
 
tVoid ToType (tInt64 &i64Value) const
 This function converts the string to an integer value. More...
 
tVoid ToType (tUInt64 &ui64Value) const
 This function converts the string to an integer value. More...
 
tVoid ToType (tFloat64 &f64Value) const
 This function converts the string to a floating-point value. More...
 
tVoid ToType (tFloat32 &f32Value) const
 This function converts the string to a floating-point value. More...
 
tVoid ToType (tBool &bValue) const
 This function converts the string to a boolean value. More...
 
tUInt32 AsUInt32 () const
 This function converts the string to an integer value. More...
 
tInt64 AsInt64 () const
 This function converts the string to an integer value. More...
 
tUInt64 AsUInt64 () const
 This function converts the string to an integer value. More...
 
tFloat64 AsFloat64 () const
 This function converts the string to a floating-point value. More...
 
tFloat32 AsFloat32 () const
 This function converts the string to a floating-point value. More...
 
tBool AsBool () const
 This function converts the string to a boolean value. More...
 
tInt64 HexToInt64 () const
 This function converts a hexadecimal string representation to an integer value. More...
 
tSize GetMaxBufferSize () const
 Return maximum size of string buffer. More...
 
tVoid HexToType (tInt64 &i64Value) const
 This function converts a hexadecimal string representation to an integer value. More...
 

Static Public Member Functions

static cFilename JoinPath (const cFilename &strPath1, const cFilename &strPath2)
 This function joins two subpaths (strPath1 and strPath2) to a new one. More...
 
static tBool IsSlash (tChar c)
 This function checks if a character is a slash. More...
 
- Static Public Member Functions inherited from string_base< cStackString >
static _myType Repeat (tChar c, tSize nCount)
 Creates a string from a repeated character. More...
 
static _myType FromType (tInt32 i32Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tUInt32 ui32Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tInt64 i64Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tUInt64 ui64Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tFloat64 f64Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tFloat32 f32Value, const _myType &strFormat=Empty)
 This function creates a new cString object from a numeric value. More...
 
static _myType FromType (tBool bValue, const _myType &strFormat=Empty)
 This function creates a new cString object from a boolean value. More...
 
static _myType Format (const value_type *strFormat,...)
 Write formatted data to a string. More...
 
static _myType ToStringFromType (T oValue, const _myType &strFormat)
 This function creates a new cString object from a numeric value. More...
 
static _myTypeCopy (_myType &strDestination, const _myType &strSource, tSize szLength=InvalidPos)
 Copies the value of one StringObject to another Stringobject. More...
 

Static Public Attributes

static constexpr const tChar WINDOWS_SLASH = '\\'
 the windows slash is '\'
 
static constexpr const tChar UNIX_SLASH = '/'
 the unis slash is '/'
 
static constexpr const tChar *const WINDOWS_DOUBLE_SLASH = "\\\\"
 the windows slash is "\\\\"
 
static constexpr const tChar *const UNIX_DOUBLE_SLASH = "//"
 the unis slash is "//"
 
static constexpr const tChar NATIVE_SLASH = UNIX_SLASH
 the native slash of the system will be defined
 
static constexpr const tChar ALTERNATIVE_SLASH = WINDOWS_SLASH
 the alternative slash will be defined (is the counterpart of NATIVE_DOUBLE_SLASH)
 
static constexpr const tChar *const NATIVE_DOUBLE_SLASH = UNIX_DOUBLE_SLASH
 the native double slash of the system will be defined
 
static constexpr const tChar *const ALTERNATIVE_DOUBLE_SLASH = WINDOWS_DOUBLE_SLASH
 the alternative double slash will be defined (is the counterpart of NATIVE_DOUBLE_SLASH)
 
static const cFilename Empty
 
- Static Public Attributes inherited from string_base< cStackString >
static const _myType Empty
 Internally used empty string.
 
static const tSize InvalidPos
 used to identicate out of range, invalidpos or default length
 

Additional Inherited Members

- Public Types inherited from string_base< cStackString >
typedef string_base< cStackString_myType
 definition my type
 
typedef cStackString _StorageType
 definition storage type
 
typedef _StorageType::value_type value_type
 definition of value type
 
typedef _StorageType::iterator iterator
 short typedefinition for cString iterators
 
typedef _StorageType::const_iterator const_iterator
 short typedefinition for cString iterators
 
typedef _StorageType::reverse_iterator reverse_iterator
 short typedefinition for cString reverse iterators
 
typedef _StorageType::const_reverse_iterator const_reverse_iterator
 short typedefinition for cString reverse iterators
 

Detailed Description

File name class.

Mind that this does not support any multi-byte encodings (UTF-8) but ANSI charsets only.

General naming conventions
Name Description
root Using windows this is a drive letter i.e. "C" or \\servername Using linux this is always "/"
drive Using windows this is a drive letter i.e. "C" detected by the ":" Using linux this is alwas "/"
folder / directory A folder is a combination of several names separated by the native slash If the last element of this combination is a filename with extension it is called a path. i.e. C:\temp\myfolder\ \etc\bin\
name The name and the extension of a filename. The last part of a filename which is detected by the last native slash i.e. C:\temp\myfolder -> myfolder C:\temp\myfolder\myfile.txt -> myfile.txt /etc/bin/bla.txt -> bla.txt
extension The last part of a filename detected by a "."
path The combination of root + folder + name

Definition at line 58 of file filename.h.

Constructor & Destructor Documentation

◆ cFilename() [1/5]

cFilename ( const cFilename oFilename)

Constructor that initializes the object with an existing cFilename object.

Parameters
oFilename[in] An existing cFilename object to be copied into this cFilename object.

◆ cFilename() [2/5]

cFilename ( const cString strString)

Constructor that initializes the filename with an existing cString object.

Parameters
strString[in] An existing cString object to be copied into this cFilename object.

◆ cFilename() [3/5]

cFilename ( const tChar pString)

Constructor that initializes the filename with a null-terminated string.

Parameters
pString[in] A null-terminated string to be copied into this cFilename object.

◆ cFilename() [4/5]

cFilename ( char  cChar)

Constructor that initializes the filename with a single character.

Parameters
cChar[in] A single character.

◆ cFilename() [5/5]

cFilename ( cFilename &&  i_oOther)

Implements move construction.

Parameters
[in]i_oOtherrValue reference of another cFilename object to be moved into this.

Member Function Documentation

◆ AppendPath()

cFilename& AppendPath ( const cFilename strPath)

Append a path string to current string.

This function does not check if a cFilename contains a filename. I.e. C:\foo.txt -> AppendPath (bar) ==> C:\foo.txt\bar. This function uses the native slashes to concatenate the paths

Parameters
strPath[in] Path to be appended
Returns
The function returns a reference to itself containing the new contents.

◆ AppendTrailingSlash()

cFilename& AppendTrailingSlash ( )

This function appends a trailing slash to the filename if there isn't one, yet.

Returns
Reference to this object with appended trailing slash

◆ CleanPath()

cFilename& CleanPath ( )

This function resolves relative components ("." or "..") within an absolute path.

It also removes slashes that follow slashes. When it is not possible to resolve all ".." elements because the root directory has already been reached then the string is cleared. If it is a relative path no modifications are performed.

Returns
void

◆ CreateAbsolutePath()

cFilename CreateAbsolutePath ( const cFilename strParent) const

This function creates an absolute path for this file regarding the given parent (Only works with native slashes!).

The parent can also be set to "", "./" or ".". The function then uses the current directory as parent.

Parameters
strParent[in] This is taken as relation for this path to create the absolute one
Returns
Created absolute path or the unchanged one

◆ CreateRelativePath()

cFilename CreateRelativePath ( const cFilename strParent) const

This function creates a relative path for this file regarding the given parent (Only works with native slashes!).

Parameters
strParent[in] This is taken as relation for this path to create the relative one
Returns
Created relative path or the unchanged one

◆ GetDrive()

cString GetDrive ( ) const

This function extracts the drive name of a filename (e.g.

"c:") Using linux a "/" will be returned if the filename is not empty.

Returns
A new cString object that contains the drive letter or an empty string.

◆ GetDriveLetter()

tChar GetDriveLetter ( ) const
Returns
the drive letter or '0' in case there is no drive letter.
The drive letter or '0' in case there is no drive letter. Using linux a '/' will be returned if the given filename is not empty.

◆ GetExtension()

cString GetExtension ( ) const

This function extract the extension of a filename.

The extension is detected by a ".". If no "." is found then empty will be returned.

Returns
A new cString object that contains the extracted extension.

◆ GetName()

cString GetName ( ) const

This function extracts the name component of a filename.

If the given filename is only a folder then the last folder name will be returned.

Returns
A new cString object that contains the extracted name.

◆ GetNameWithoutExtension()

cString GetNameWithoutExtension ( ) const

This function extract the name component of a filename.

No extension is appended to the name. If the given filename is a folder name then the last folder name will be returned

Returns
A new cString object that contains the extracted name.

◆ GetPath()

cFilename GetPath ( ) const

This function extract the path of the parent folder and/or the root component of a file/folder.

If the given filename is a folder then its parent folder will be extracted.

Returns
A new cFilename object that contains the parent folder without a trailing slash. On linux "/" is returned if root is the parent of the file/folder.

◆ GetRoot()

cFilename GetRoot ( ) const

This function extract the root component of a filename (without double point).

Returns
A new cFilename object that contains the extracted root. Using linux a "/" will be returned if the given filename is not empty.

◆ IsAbsolute()

tBool IsAbsolute ( ) const

This function checks the filename if it is absolute.

Returns
The function returns true, if the filename is absolute and false, if it is relative or an error has occured.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsRelative()

tBool IsRelative ( ) const

This function checks the filename if it is relative.

Returns
The function returns true, if the filename is relative and false, if it is relative or an error has occured.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ IsSlash()

static tBool IsSlash ( tChar  c)
static

This function checks if a character is a slash.

Parameters
c[in] Character to be checked.
Returns
The function returns true, if the Character is a Shlash, and false if not.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ JoinPath()

static cFilename JoinPath ( const cFilename strPath1,
const cFilename strPath2 
)
static

This function joins two subpaths (strPath1 and strPath2) to a new one.

Parameters
strPath1[in] First path to be joined
strPath2[in] Second path to be joined
Returns
The function returns the new (created) Path. The concatenation uses the native Slashes of the current OS (i.e Windows "\\" and Unix "/").

◆ MakeBackwardSlashes()

cFilename& MakeBackwardSlashes ( )

This function changes all forward slashes to backslashes.

Returns
Reference to this changed object.

◆ MakeForwardSlashes()

cFilename& MakeForwardSlashes ( )

This function changes all backslashes to forward slashes.

Returns
Reference to this changed object.

◆ MakeNativeSlashes()

cFilename& MakeNativeSlashes ( )

This function changes all slashes to OS specific slashes.

Returns
Reference to this object with native slashes.

◆ operator=() [1/5]

cFilename& operator= ( cFilename &&  i_oOther)

Implements move assignment.

Parameters
[in]i_oOtherrValue reference of another cFilename object to be moved into this.

◆ operator=() [2/5]

cFilename& operator= ( const cFilename i_oOther)

Copy assignment operator.

Parameters
[in]i_oOtherObject to copy assign this from

◆ operator=() [3/5]

cFilename& operator= ( const cString sString)

assigns a given string

Parameters
[in]sStringgiven string containing a filename /path
Returns
Reference to current object

◆ operator=() [4/5]

cFilename& operator= ( const tChar pString)

assigns a given string

Parameters
[in]pStringgiven string containing a filename / path
Returns
Reference to current object

◆ operator=() [5/5]

cFilename& operator= ( tChar  cChar)

assigns a given string

Parameters
[in]cChargiven string containing a filename / path
Returns
Reference to current object

◆ RemoveTrailingSlash()

cFilename& RemoveTrailingSlash ( )

This function removes a trailing slash from the filename if there is one.

Returns
Reference to this object without the remove trailing slash.

◆ SetExtension()

cFilename& SetExtension ( const cString strExtension)

This function changes the extension of a filename.

Parameters
strExtension[in] cString object that specifies the new extension.
Returns
Reference to this object with appended extension.

◆ SplitPath()

tVoid SplitPath ( cStringList List) const

Split path into a string list.

This function splits up a path into several parts.

Parameters
List[inout] Reference to cStringList object that is filled. The list is cleaned first.
Returns
void