ATL Path Functions

Visual Studio 2015
 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at ATL Path functions.

ATL provides the ATLPath class for manipulating paths in the form of CPathT. This code can be found in atlpath.h.

Related Classes

CPathT ClassThis class represents a path.

Related Typedefs

CPathA specialization of CPathT using CString.
CPathAA specialization of CPathT using CStringA.
CPathWA specialization of CPathT using CStringW.

Functions

ATLPath::AddBackslashThis function is an overloaded wrapper for PathAddBackslash.
ATLPath::AddExtensionThis function is an overloaded wrapper for PathAddExtension.
ATLPath::AppendThis function is an overloaded wrapper for PathAppend.
ATLPath::BuildRootThis function is an overloaded wrapper for PathBuildRoot.
ATLPath::CanonicalizeThis function is an overloaded wrapper for PathCanonicalize.
ATLPath::CombineThis function is an overloaded wrapper for PathCombine.
ATLPath::CommonPrefixThis function is an overloaded wrapper for PathCommonPrefix.
ATLPath::CompactPathThis function is an overloaded wrapper for PathCompactPath.
ATLPath::CompactPathExThis function is an overloaded wrapper for PathCompactPathEx.
ATLPath::FileExistsThis function is an overloaded wrapper for PathFileExists.
ATLPath::FindExtensionThis function is an overloaded wrapper for PathFindExtension.
ATLPath::FindFileNameThis function is an overloaded wrapper for PathFindFileName.
ATLPath::GetDriveNumberThis function is an overloaded wrapper for PathGetDriveNumber.
ATLPath::IsDirectoryThis function is an overloaded wrapper for PathIsDirectory.
ATLPath::IsFileSpecThis function is an overloaded wrapper for PathIsFileSpec.
ATLPath::IsPrefixThis function is an overloaded wrapper for PathIsPrefix.
ATLPath::IsRelativeThis function is an overloaded wrapper for PathIsRelative.
ATLPath::IsRootThis function is an overloaded wrapper for PathIsRoot.
ATLPath::IsSameRootThis function is an overloaded wrapper for PathIsSameRoot.
ATLPath::IsUNCThis function is an overloaded wrapper for PathIsUNC.
ATLPath::IsUNCServerThis function is an overloaded wrapper for PathIsUNCServer.
ATLPath::IsUNCServerShareThis function is an overloaded wrapper for PathIsUNCServerShare.
ATLPath::MakePrettyThis function is an overloaded wrapper for PathMakePretty.
ATLPath::MatchSpecThis function is an overloaded wrapper for PathMatchSpec.
ATLPath::QuoteSpacesThis function is an overloaded wrapper for PathQuoteSpaces.
ATLPath::RelativePathToThis function is an overloaded wrapper for PathRelativePathTo.
ATLPath::RemoveArgsThis function is an overloaded wrapper for PathRemoveArgs.
ATLPath::RemoveBackslashThis function is an overloaded wrapper for PathRemoveBackslash.
ATLPath::RemoveBlanksThis function is an overloaded wrapper for PathRemoveBlanks.
ATLPath::RemoveExtensionThis function is an overloaded wrapper for PathRemoveExtension.
ATLPath::RemoveFileSpecThis function is an overloaded wrapper for PathRemoveFileSpec.
ATLPath::RenameExtensionThis function is an overloaded wrapper for PathRenameExtension.
ATLPath::SkipRootThis function is an overloaded wrapper for PathSkipRoot.
ATLPath::StripPathThis function is an overloaded wrapper for PathStripPath.
ATLPath::StripToRootThis function is an overloaded wrapper for PathStripToRoot.
ATLPath::UnquoteSpacesThis function is an overloaded wrapper for PathUnquoteSpaces.

This function is an overloaded wrapper for PathAddBackslash.

Syntax

inline char* AddBackslash(char* pszPath);  
inline wchar_t* AddBackslash(wchar_t* pszPath);  

Remarks

See PathAddBackslash for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathAddExtension.

Syntax

inline BOOL AddExtension(char* pszPath, const char* pszExtension);  
inline BOOL AddExtension(wchar_t* pszPath, const wchar_t* pszExtension);  

Remarks

See PathAddExtension for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathAppend.

Syntax

inline BOOL Append(char* pszPath, const char* pszMore);  
inline BOOL Append(wchar_t* pszPath, const wchar_t* pszMore);  

Remarks

See PathAppend for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathBuildRoot.

Syntax

inline char* BuildRoot(char* pszPath, int iDrive);  
inline wchar_t* BuildRoot(wchar_t* pszPath, int iDrive);  

Remarks

See PathBuildRoot for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathCanonicalize.

Syntax

inline BOOL Canonicalize(char* pszDest, const char* pszSrc);  
inline BOOL Canonicalize(wchar_t* pszDest, const wchar_t* pszSrc);  

Remarks

See PathCanonicalize for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathCommonPrefix.

Syntax

inline int CommonPrefix(  
   const char* pszFile1, 
   const char* pszFile2,  
   char* pszDest);  

inline int CommonPrefix(  
   const wchar_t* pszFile1,  
   const wchar_t* pszFile2,  
   wchar_t* pszDest);  

Remarks

See PathCommonPrefix for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathCompactPath.

Syntax

inline BOOL CompactPath(  
   HDC hDC,  
   char* pszPath,  
   UINT dx);  

inline BOOL CompactPath(  
   HDC hDC,  
   wchar_t* pszPath,  
   UINT dx);  

Remarks

See PathCompactPath for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathCompactPathEx.

Syntax

inline BOOL CompactPathEx(  
   char* pszDest,  
   const char* pszSrc,  
   UINT nMaxChars,  
   DWORD dwFlags);  

inline BOOL CompactPathEx(  
   wchar_t* pszDest,  
   const wchar_t* pszSrc,  
   UINT nMaxChars,  
   DWORD dwFlags);  

Remarks

See PathCompactPathEx for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathFileExists.

Syntax

inline BOOL FileExists(const char* pszPath);  
inline BOOL FileExists(const wchar_t* pszPath);  

Remarks

See PathFileExists for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathFindExtension.

Syntax

inline char* FindExtension(const char* pszPath);  
inline wchar_t* FindExtension(const wchar_t* pszPath);  

Remarks

See PathFindExtension for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathFindFileName.

Syntax

inline char* FindFileName(const char* pszPath);  
inline wchar_t* FindFileName(const wchar_t* pszPath);  

Remarks

See PathFindFileName for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathGetDriveNumber.

Syntax

inline int GetDriveNumber(const char* pszPath);  
inline int GetDriveNumber(const wchar_t* pszPath);  

Remarks

See PathGetDriveNumber for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsFileSpec.

Syntax

inline BOOL IsFileSpec(const char* pszPath);  
inline BOOL IsFileSpec(const wchar_t* pszPath);  

Remarks

See PathIsFileSpec for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsPrefix.

Syntax

inline BOOL IsPrefix(const char* pszPrefix, const char* pszPath);  
inline BOOL IsPrefix(const wchar_t* pszPrefix, const wchar_t* pszPath);  

Remarks

See PathIsPrefix for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsRelative.

Syntax

inline BOOL IsRelative(const char* pszPath);  
inline BOOL IsRelative(const wchar_t* pszPath);  

Remarks

See PathIsRelative for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsRoot.

Syntax

inline BOOL IsRoot(const char* pszPath);  
inline BOOL IsRoot(const wchar_t* pszPath);  

Remarks

See PathIsRoot for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsSameRoot.

Syntax

inline BOOL IsSameRoot(const char* pszPath1, const char* pszPath2);  
inline BOOL IsSameRoot(const wchar_t* pszPath1, const wchar_t* pszPath2);  

Remarks

See PathIsSameRoot for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsUNC.

Syntax

inline BOOL IsUNC(const char* pszPath);  
inline BOOL IsUNC(const wchar_t* pszPath);  

Remarks

See PathIsUNC for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsUNCServer.

Syntax

inline BOOL IsUNCServer(const char* pszPath);  
inline BOOL IsUNCServer(const wchar_t* pszPath);  

Remarks

See PathIsUNCServer for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathIsUNCServerShare.

Syntax

inline BOOL IsUNCServerShare(const char* pszPath);  
inline BOOL IsUNCServerShare(const wchar_t* pszPath);  

Remarks

See PathIsUNCServerShare for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathMakePretty.

Syntax

inline BOOL MakePretty(char* pszPath);  
inline BOOL MakePretty(wchar_t* pszPath);  

Remarks

See PathMakePretty for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathMatchSpec.

Syntax

inline BOOL MatchSpec(const char* pszPath, const char* pszSpec);  
inline BOOL MatchSpec(const wchar_t* pszPath, const wchar_t* pszSpec);  

Remarks

See PathMatchSpec for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathQuoteSpaces.

Syntax

inline void QuoteSpaces(char* pszPath);  
inline void QuoteSpaces(wchar_t* pszPath);  

Remarks

See PathQuoteSpaces for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRelativePathTo.

Syntax

inline BOOL RelativePathTo(  
   char* pszPath,  
   const char* pszFrom,  
   DWORD dwAttrFrom,  
   const char* pszTo,  
   DWORD dwAttrTo);  

inline BOOL RelativePathTo(  
   wchar_t* pszPath,  
   const wchar_t* pszFrom,  
   DWORD dwAttrFrom,  
   const wchar_t* pszTo,  
   DWORD dwAttrTo);  

Remarks

See PathRelativePathTo for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRemoveArgs.

Syntax

inline void RemoveArgs(char* pszPath);  
inline void RemoveArgs(wchar_t* pszPath);  

Remarks

See PathRemoveArgs for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRemoveBackslash.

Syntax

inline char* RemoveBackslash(char* pszPath);  
inline wchar_t* RemoveBackslash(wchar_t* pszPath);  

Remarks

See PathRemoveBackslash for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRemoveBlanks.

Syntax

inline void RemoveBlanks(char* pszPath);  
inline void RemoveBlanks(wchar_t* pszPath);  

Remarks

See PathRemoveBlanks for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRemoveExtension.

Syntax

inline void RemoveExtension(char* pszPath);  
inline void RemoveExtension(wchar_t* pszPath);  

Remarks

See PathRemoveExtension for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRemoveFileSpec.

Syntax

inline BOOL RemoveFileSpec(char* pszPath);  
inline BOOL RemoveFileSpec(wchar_t* pszPath);  

Remarks

See PathRemoveFileSpec for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathRenameExtension.

Syntax

inline BOOL RenameExtension(char* pszPath, const char* pszExt);  
inline BOOL RenameExtension(wchar_t* pszPath, const wchar_t* pszExt);  

Remarks

See PathRenameExtension for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathSkipRoot.

Syntax

inline char* SkipRoot(const char* pszPath);  
inline wchar_t* SkipRoot(const wchar_t* pszPath);  

Remarks

See PathSkipRoot for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathStripPath.

Syntax

inline void StripPath(char* pszPath);  
inline void StripPath(wchar_t* pszPath);  

Remarks

See PathStripPath for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathStripToRoot.

Syntax

inline BOOL StripToRoot(char* pszPath);  
inline BOOL StripToRoot(wchar_t* pszPath);  

Remarks

See PathStripToRoot for details.

Requirements

Header: atlpath.h

This function is an overloaded wrapper for PathUnquoteSpaces.

Syntax

inline void UnquoteSpaces(char* pszPath);  
inline void UnquoteSpaces(wchar_t* pszPath);  

Remarks

See PathUnquoteSpaces for details.

Requirements

Header: atlpath.h

Show: