Rediger

Del via


ATL Path functions

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

Class Description
CPathT Class This class represents a path.
Typedef Description
CPath A specialization of CPathT using CString.
CPathA A specialization of CPathT using CStringA.
CPathW A specialization of CPathT using CStringW.

Functions

Function Description
ATLPath::AddBackslash This function is an overloaded wrapper for PathAddBackslash.
ATLPath::AddExtension This function is an overloaded wrapper for PathAddExtension.
ATLPath::Append This function is an overloaded wrapper for PathAppend.
ATLPath::BuildRoot This function is an overloaded wrapper for PathBuildRoot.
ATLPath::Canonicalize This function is an overloaded wrapper for PathCanonicalize.
ATLPath::Combine This function is an overloaded wrapper for PathCombine.
ATLPath::CommonPrefix This function is an overloaded wrapper for PathCommonPrefix.
ATLPath::CompactPath This function is an overloaded wrapper for PathCompactPath.
ATLPath::CompactPathEx This function is an overloaded wrapper for PathCompactPathEx.
ATLPath::FileExists This function is an overloaded wrapper for PathFileExists.
ATLPath::FindExtension This function is an overloaded wrapper for PathFindExtension.
ATLPath::FindFileName This function is an overloaded wrapper for PathFindFileName.
ATLPath::GetDriveNumber This function is an overloaded wrapper for PathGetDriveNumber.
ATLPath::IsDirectory This function is an overloaded wrapper for PathIsDirectory.
ATLPath::IsFileSpec This function is an overloaded wrapper for PathIsFileSpec.
ATLPath::IsPrefix This function is an overloaded wrapper for PathIsPrefix.
ATLPath::IsRelative This function is an overloaded wrapper for PathIsRelative.
ATLPath::IsRoot This function is an overloaded wrapper for PathIsRoot.
ATLPath::IsSameRoot This function is an overloaded wrapper for PathIsSameRoot.
ATLPath::IsUNC This function is an overloaded wrapper for PathIsUNC.
ATLPath::IsUNCServer This function is an overloaded wrapper for PathIsUNCServer.
ATLPath::IsUNCServerShare This function is an overloaded wrapper for PathIsUNCServerShare.
ATLPath::MakePretty This function is an overloaded wrapper for PathMakePretty.
ATLPath::MatchSpec This function is an overloaded wrapper for PathMatchSpec.
ATLPath::QuoteSpaces This function is an overloaded wrapper for PathQuoteSpaces.
ATLPath::RelativePathTo This function is an overloaded wrapper for PathRelativePathTo.
ATLPath::RemoveArgs This function is an overloaded wrapper for PathRemoveArgs.
ATLPath::RemoveBackslash This function is an overloaded wrapper for PathRemoveBackslash.
ATLPath::RemoveBlanks This function is an overloaded wrapper for PathRemoveBlanks.
ATLPath::RemoveExtension This function is an overloaded wrapper for PathRemoveExtension.
ATLPath::RemoveFileSpec This function is an overloaded wrapper for PathRemoveFileSpec.
ATLPath::RenameExtension This function is an overloaded wrapper for PathRenameExtension.
ATLPath::SkipRoot This function is an overloaded wrapper for PathSkipRoot.
ATLPath::StripPath This function is an overloaded wrapper for PathStripPath.
ATLPath::StripToRoot This function is an overloaded wrapper for PathStripToRoot.
ATLPath::UnquoteSpaces This function is an overloaded wrapper for PathUnquoteSpaces.

Requirements

Header: atlpath.h

ATLPath::AddBackSlash

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.

ATLPath::AddExtension

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.

ATLPath::Append

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.

ATLPath::BuildRoot

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.

ATLPath::Canonicalize

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.

ATLPath::Combine

This function is an overloaded wrapper for PathCombine.

Syntax

inline char* Combine(
   char* pszDest,
   const char* pszDir,
   const char* pszFile
);

inline wchar_t* Combine(
   wchar_t* pszDest,
   const wchar_t* pszDir,
   const wchar_t* pszFile);

Remarks

See PathCombine for details.

ATLPath::CommonPrefix

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.

ATLPath::CompactPath

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.

ATLPath::CompactPathEx

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.

ATLPath::FileExists

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.

ATLPath::FindExtension

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.

ATLPath::FindFileName

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.

ATLPath::GetDriveNumber

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.

ATLPath::IsDirectory

This function is an overloaded wrapper for PathIsDirectory.

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

Remarks

See PathIsDirectory for details.

ATLPath::IsFileSpec

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.

ATLPath::IsPrefix

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.

ATLPath::IsRelative

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.

ATLPath::IsRoot

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.

ATLPath::IsSameRoot

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.

ATLPath::IsUNC

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.

ATLPath::IsUNCServer

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.

ATLPath::IsUNCServerShare

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.

ATLPath::MakePretty

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.

ATLPath::MatchSpec

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.

ATLPath::QuoteSpaces

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.

ATLPath::RelativePathTo

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.

ATLPath::RemoveArgs

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.

ATLPath::RemoveBackslash

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.

ATLPath::RemoveBlanks

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.

ATLPath::RemoveExtension

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.

ATLPath::RemoveFileSpec

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.

ATLPath::RenameExtension

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.

ATLPath::SkipRoot

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.

ATLPath::StripPath

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.

ATLPath::StripToRoot

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.

ATLPath::UnquoteSpaces

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.