Freigeben über


CPathT Members

Methods

AddBackslash

Call this method to add a backslash to the end of a string to create the correct syntax for a path.

AddExtension

Call this method to add a file extension to a path.

Append

Call this method to append a string to the current path.

BuildRoot

Call this method to create a root path from a given drive number.

Canonicalize

Call this method to convert the path to canonical form.

Combine

Call this method to concatenate a string representing a directory name and a string representing a file path name into one path.

CommonPrefix

Call this method to determine whether the specified path shares a common prefix with the current path.

CompactPath

Call this method to truncate a file path to fit within a given pixel width by replacing path components with ellipses.

CompactPathEx

Call this method to truncate a file path to fit within a given number of characters by replacing path components with ellipses.

CPathT

The constructor for the path.

FileExists

Call this method to check whether the file at this path name exists.

FindExtension

Call this method to find the position of the file extension within the path.

FindFileName

Call this method to find the position of the file name within the path.

GetDriveNumber

Call this method to search the path for a drive letter within the range of 'A' to 'Z' and return the corresponding drive number.

GetExtension

Call this method to get the file extension from the path.

IsDirectory

Call this method to check whether the path is a valid directory.

IsFileSpec

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.

IsPrefix

Call this method to determine whether a path contains a valid prefix of the type passed by pszPrefix.

IsRelative

Call this method to determine if the path is relative.

IsRoot

Call this method to determine if the path is a directory root.

IsSameRoot

Call this method to determine whether another path has a common root component with the current path.

IsUNC

Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server and share.

IsUNCServer

Call this method to determine whether the path is a valid UNC (universal naming convention) path for a server only.

IsUNCServerShare

Call this method to determine whether the path is a valid UNC (universal naming convention) share path, \\server\share.

MakePretty

Call this method to convert a path to all lowercase characters to give the path a consistent appearance.

MatchSpec

Call this method to search the path for a string containing a wildcard match type.

QuoteSpaces

Call this method to enclose the path in quotation marks if it contains any spaces.

RelativePathTo

Call this method to create a relative path from one file or folder to another.

RemoveArgs

Call this method to remove any command-line arguments from the path.

RemoveBackslash

Call this method to remove the trailing backslash from the path.

RemoveBlanks

Call this method to remove all leading and trailing spaces from the path.

RemoveExtension

Call this method to remove the file extension from the path, if there is one.

RemoveFileSpec

Call this method to remove the trailing file name and backslash from the path, if it has them.

RenameExtension

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.

SkipRoot

Call this method to parse a path, ignoring the drive letter or UNC server/share path parts.

StripPath

Call this method to remove the path portion of a fully qualified path and file name.

StripToRoot

Call this method to remove all parts of the path except for the root information.

UnquoteSpaces

Call this method to remove quotation marks from the beginning and end of a path.

Operators

operator +=

This operator appends a string to the path.

operator const StringType &

This operator allows the object to be treated like a string.

operator CPathT::PCXSTR

This operator allows the object to be treated like a string.

operator StringType &

This operator allows the object to be treated like a string.

Data Members

m_strPath

The path.

Typedefs

XCHAR

A character type.

PCXSTR

A constant string type.

PXSTR

A string type.

See Also

Concepts

CPathT Class