CPathT Class
This class represents a path.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
template< typename StringType>
class CPathT
Parameters
- StringType
The ATL/MFC string class to use for the path (see CStringT).
Members
Public Typedefs
Name |
Description |
---|---|
A constant string type. |
|
A string type. |
|
A character type. |
Public Constructors
Name |
Description |
---|---|
The constructor for the path. |
Public Methods
Name |
Description |
---|---|
Call this method to add a backslash to the end of a string to create the correct syntax for a path. |
|
Call this method to add a file extension to a path. |
|
Call this method to append a string to the current path. |
|
Call this method to create a root path from a given drive number. |
|
Call this method to convert the path to canonical form. |
|
Call this method to concatenate a string representing a directory name and a string representing a file path name into one path. |
|
Call this method to determine whether the specified path shares a common prefix with the current path. |
|
Call this method to truncate a file path to fit within a given pixel width by replacing path components with ellipses. |
|
Call this method to truncate a file path to fit within a given number of characters by replacing path components with ellipses. |
|
Call this method to check whether the file at this path name exists. |
|
Call this method to find the position of the file extension within the path. |
|
Call this method to find the position of the file name within the path. |
|
Call this method to search the path for a drive letter within the range of 'A' to 'Z' and return the corresponding drive number. |
|
Call this method to get the file extension from the path. |
|
Call this method to check whether the path is a valid directory. |
|
Call this method to search a path for any path-delimiting characters (for example, ':' or '\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path. |
|
Call this method to determine whether a path contains a valid prefix of the type passed by pszPrefix. |
|
Call this method to determine if the path is relative. |
|
Call this method to determine if the path is a directory root. |
|
Call this method to determine whether another path has a common root component with the current path. |
|
Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server and share. |
|
Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server only. |
|
Call this method to determine whether the path is a valid UNC (universal naming convention) share path, \\server\share. |
|
Call this method to convert a path to all lowercase characters to give the path a consistent appearance. |
|
Call this method to search the path for a string containing a wildcard match type. |
|
Call this method to enclose the path in quotation marks if it contains any spaces. |
|
Call this method to create a relative path from one file or folder to another. |
|
Call this method to remove any command-line arguments from the path. |
|
Call this method to remove the trailing backslash from the path. |
|
Call this method to remove all leading and trailing spaces from the path. |
|
Call this method to remove the file extension from the path, if there is one. |
|
Call this method to remove the trailing file name and backslash from the path, if it has them. |
|
Call this method to replace the file name extension in the path with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string. |
|
Call this method to parse a path, ignoring the drive letter or UNC server/share path parts. |
|
Call this method to remove the path portion of a fully qualified path and file name. |
|
Call this method to remove all parts of the path except for the root information. |
|
Call this method to remove quotation marks from the beginning and end of a path. |
Public Operators
Name |
Description |
---|---|
This operator allows the object to be treated like a string. |
|
This operator allows the object to be treated like a string. |
|
This operator allows the object to be treated like a string. |
|
This operator appends a string to the path. |
Public Data Members
Name |
Description |
---|---|
The path. |
Remarks
CPath, CPathA, and CPathW are instantiations of CPathT defined as follows:
typedef CPathT< CString > CPath;
typedef CPathT< CStringA > CPathA;
typedef CPathT< CStringW > CPathW;
Requirements
Header: atlpath.h