OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TSHPath Class Reference

delay loading SHLWAPI.DLL More...

#include <owl/shelwapi.h>

Static Public Member Functions

static TCHARAddBackslash (TCHAR *pszPath)
 Adds a backslash to the end of a string to create the correct syntax for a path.
 
static BOOL AddExtension (TCHAR *pszPath, LPCTSTR pszExt)
 Adds a file extension to a path string.
 
static BOOL Append (TCHAR *pszPath, LPCTSTR pMore)
 Appends one path to the end of another.
 
static TCHARBuildRoot (TCHAR *pszRoot, int iDrive)
 Creates a root path from a given drive number.
 
static BOOL Canonicalize (TCHAR *pszBuf, LPCTSTR pszPath)
 Canonicalizes a path.
 
static TCHARCombine (TCHAR *pszDest, LPCTSTR pszDir, LPCTSTR pszFile)
 Concatenates two strings that represent properly formed paths into one path, as well as any relative path pieces.
 
static BOOL CompactPath (HDC hDC, TCHAR *pszPath, UINT dx)
 Truncates a file path to fit within a given pixel width by replacing path components with ellipses.
 
static BOOL CompactPathEx (TCHAR *pszOut, LPCTSTR pszSrc, UINT cchMax, DWORD dwFlags)
 
static int CommonPrefix (LPCTSTR pszFile1, LPCTSTR pszFile2, TCHAR *achPath)
 Compares two paths to determine if they share a common prefix.
 
static BOOL FileExists (LPCTSTR pszPath)
 Determines whether a path to a file system object such as a file or directory is valid.
 
static TCHARFindExtension (LPCTSTR pszPath)
 Searches a path for an extension.
 
static TCHARFindFileName (LPCTSTR pszPath)
 Searches a path for a file name.
 
static TCHARFindNextComponent (LPCTSTR pszPath)
 Parses a path for the next path component.
 
static BOOL FindOnPath (TCHAR *pszPath, LPCTSTR *ppszOtherDirs)
 Searches for a file.
 
static TCHARGetArgs (LPCTSTR pszPath)
 Finds the command line arguments within a given path.
 
static LPCTSTR FindSuffixArray (LPCTSTR pszPath, const LPCTSTR *apszSuffix, int iArraySize)
 Determines if a given file name has one of a list of suffixes.
 
static BOOL IsLFNFileSpec (LPCTSTR lpName)
 Determines whether or not a file name is in long format.
 
static UINT GetCharType (tchar ch)
 Determines the type of character with respect to a path.
 
static int GetDriveNumber (LPCTSTR pszPath)
 Searches a path for a drive letter within the range of 'A' to 'Z' and returns the corresponding drive number.
 
static BOOL IsDirectory (LPCTSTR pszPath)
 Verifies that a path is a valid directory.
 
static BOOL IsDirectoryEmpty (LPCTSTR pszPath)
 Determines whether or not a specified path is an empty directory.
 
static BOOL IsFileSpec (LPCTSTR pszPath)
 Searches a path for any path delimiting characters (for example, ':' or '\' ).
 
static BOOL IsPrefix (LPCTSTR pszPrefix, LPCTSTR pszPath)
 Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix.
 
static BOOL IsRelative (LPCTSTR pszPath)
 Searches a path and determines if it is relative.
 
static BOOL IsRoot (LPCTSTR pszPath)
 Parses a path to determine if it is a directory root.
 
static BOOL IsSameRoot (LPCTSTR pszPath1, LPCTSTR pszPath2)
 Compares two paths to determine if they have a common root component.
 
static BOOL IsUNC (LPCTSTR pszPath)
 Determines if the string is a valid UNC (universal naming convention) for a server and share path.
 
static BOOL IsNetworkPath (LPCTSTR pszPath)
 Determines whether a path string represents a network resource.
 
static BOOL IsUNCServer (LPCTSTR pszPath)
 Determines if a string is a valid UNC (universal naming convention) for a server path only.
 
static BOOL IsUNCServerShare (LPCTSTR pszPath)
 Determines if a string is a valid universal naming convention (UNC) share path, \\server\share.
 
static BOOL IsContentType (LPCTSTR pszPath, LPCTSTR pszContentType)
 Determines if a file's registered content type matches the specified content type.
 
static BOOL IsURL (LPCTSTR pszPath)
 Tests a given string to determine if it conforms to a valid URL format.
 
static BOOL MakePretty (TCHAR *pszPath)
 Converts a path to all lowercase characters to give the path a consistent appearance.
 
static BOOL MatchSpec (LPCTSTR pszFile, LPCTSTR pszSpec)
 Searches a string using a DOS wild card match type.
 
static int ParseIconLocation (TCHAR *pszIconFile)
 Parses a file location string containing a file location and icon index, and returns separate values.
 
static void QuoteSpaces (TCHAR *lpsz)
 Searches a path for spaces.
 
static BOOL RelativePathTo (TCHAR *pszPath, LPCTSTR pszFrom, DWORD dwAttrFrom, LPCTSTR pszTo, DWORD dwAttrTo)
 Creates a relative path from one file or folder to another.
 
static void RemoveArgs (TCHAR *pszPath)
 Removes any arguments from a given path.
 
static TCHARRemoveBackslash (TCHAR *pszPath)
 Removes the trailing backslash from a given path.
 
static void RemoveBlanks (TCHAR *pszPath)
 Removes all leading and trailing spaces from a string.
 
static void RemoveExtension (TCHAR *pszPath)
 Removes the file extension from a path, if there is one.
 
static BOOL RemoveFileSpec (TCHAR *pszPath)
 Removes the trailing file name and backslash from a path, if it has them.
 
static BOOL RenameExtension (TCHAR *pszPath, LPCTSTR pszExt)
 Replaces the extension of a file name with a new extension.
 
static BOOL SearchAndQualify (LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
 Determines if a given path is correctly formatted and fully qualified.
 
static void SetDlgItemPath (HWND hDlg, int id, LPCTSTR pszPath)
 Sets the text of a child control in a window or dialog box, using PathCompactPath to make sure the path fits in the control.
 
static TCHARSkipRoot (LPCTSTR pszPath)
 Parses a path, ignoring the drive letter or UNC server/share path parts.
 
static void StripPath (TCHAR *pszPath)
 Removes the path portion of a fully qualified path and file.
 
static BOOL StripToRoot (TCHAR *pszPath)
 Removes all parts of the path except for the root information.
 
static void UnquoteSpaces (TCHAR *lpsz)
 Removes quotes from the beginning and end of a path.
 
static BOOL MakeSystemFolder (LPCTSTR pszPath)
 Gives an existing folder the proper attributes to become a system folder.
 
static BOOL UnmakeSystemFolder (LPCTSTR pszPath)
 Removes the attributes from a folder that make it a system folder.
 
static BOOL IsSystemFolder (LPCTSTR pszPath, DWORD dwAttrb)
 Determines if an existing folder contains the attributes that make it a system folder.
 
static void Undecorate (TCHAR *pszPath)
 Removes the decoration from a path string.
 
static BOOL UnExpandEnvStrings (LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
 Takes a fully qualified path, and replaces several folder names with their associated environment string.
 
static BOOL UnExpandEnvStringsForUser (HANDLE hToken, LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
 
static TModuleGetModule ()
 

Detailed Description

delay loading SHLWAPI.DLL

Definition at line 92 of file shelwapi.h.

Member Function Documentation

◆ AddBackslash()

TCHAR * owl::TSHPath::AddBackslash ( TCHAR * pszPath)
static

Adds a backslash to the end of a string to create the correct syntax for a path.

If the source path already has a trailing backslash, no backslash will be added

Definition at line 300 of file shelwapi.cpp.

References GetModule().

◆ AddExtension()

BOOL owl::TSHPath::AddExtension ( TCHAR * pszPath,
LPCTSTR pszExt )
static

Adds a file extension to a path string.

Definition at line 308 of file shelwapi.cpp.

References GetModule().

◆ Append()

BOOL owl::TSHPath::Append ( TCHAR * pszPath,
LPCTSTR pMore )
static

Appends one path to the end of another.

Definition at line 316 of file shelwapi.cpp.

References GetModule().

◆ BuildRoot()

TCHAR * owl::TSHPath::BuildRoot ( TCHAR * pszRoot,
int iDrive )
static

Creates a root path from a given drive number.

Definition at line 324 of file shelwapi.cpp.

References GetModule().

◆ Canonicalize()

BOOL owl::TSHPath::Canonicalize ( TCHAR * pszBuf,
LPCTSTR pszPath )
static

Canonicalizes a path.

Definition at line 332 of file shelwapi.cpp.

References GetModule().

◆ Combine()

TCHAR * owl::TSHPath::Combine ( TCHAR * pszDest,
LPCTSTR pszDir,
LPCTSTR pszFile )
static

Concatenates two strings that represent properly formed paths into one path, as well as any relative path pieces.

Definition at line 340 of file shelwapi.cpp.

References GetModule().

◆ CommonPrefix()

int owl::TSHPath::CommonPrefix ( LPCTSTR pszFile1,
LPCTSTR pszFile2,
TCHAR * achPath )
static

Compares two paths to determine if they share a common prefix.

A prefix is one of these types: "C:\\", ".", "..", "..\".

Definition at line 364 of file shelwapi.cpp.

References GetModule().

◆ CompactPath()

BOOL owl::TSHPath::CompactPath ( HDC hDC,
TCHAR * pszPath,
UINT dx )
static

Truncates a file path to fit within a given pixel width by replacing path components with ellipses.

Definition at line 348 of file shelwapi.cpp.

References GetModule().

◆ CompactPathEx()

BOOL owl::TSHPath::CompactPathEx ( TCHAR * pszOut,
LPCTSTR pszSrc,
UINT cchMax,
DWORD dwFlags )
static

Definition at line 356 of file shelwapi.cpp.

References GetModule().

◆ FileExists()

BOOL owl::TSHPath::FileExists ( LPCTSTR pszPath)
static

Determines whether a path to a file system object such as a file or directory is valid.

Definition at line 372 of file shelwapi.cpp.

References GetModule().

◆ FindExtension()

TCHAR * owl::TSHPath::FindExtension ( LPCTSTR pszPath)
static

Searches a path for an extension.

Definition at line 380 of file shelwapi.cpp.

References GetModule().

◆ FindFileName()

TCHAR * owl::TSHPath::FindFileName ( LPCTSTR pszPath)
static

Searches a path for a file name.

Definition at line 388 of file shelwapi.cpp.

References GetModule().

◆ FindNextComponent()

TCHAR * owl::TSHPath::FindNextComponent ( LPCTSTR pszPath)
static

Parses a path for the next path component.

Definition at line 396 of file shelwapi.cpp.

References GetModule().

◆ FindOnPath()

BOOL owl::TSHPath::FindOnPath ( TCHAR * pszPath,
LPCTSTR * ppszOtherDirs )
static

Searches for a file.

Definition at line 404 of file shelwapi.cpp.

References GetModule().

◆ FindSuffixArray()

LPCTSTR owl::TSHPath::FindSuffixArray ( LPCTSTR pszPath,
const LPCTSTR * apszSuffix,
int iArraySize )
static

Determines if a given file name has one of a list of suffixes.

Definition at line 420 of file shelwapi.cpp.

References GetModule().

◆ GetArgs()

TCHAR * owl::TSHPath::GetArgs ( LPCTSTR pszPath)
static

Finds the command line arguments within a given path.

Definition at line 412 of file shelwapi.cpp.

References GetModule().

◆ GetCharType()

UINT owl::TSHPath::GetCharType ( tchar ch)
static

Determines the type of character with respect to a path.

Definition at line 436 of file shelwapi.cpp.

References GetModule().

◆ GetDriveNumber()

int owl::TSHPath::GetDriveNumber ( LPCTSTR pszPath)
static

Searches a path for a drive letter within the range of 'A' to 'Z' and returns the corresponding drive number.

Definition at line 444 of file shelwapi.cpp.

References GetModule().

◆ GetModule()

TModule & owl::TSHPath::GetModule ( )
static

Definition at line 293 of file shelwapi.cpp.

◆ IsContentType()

BOOL owl::TSHPath::IsContentType ( LPCTSTR pszPath,
LPCTSTR pszContentType )
static

Determines if a file's registered content type matches the specified content type.

This function obtains the content type for the specified file type and compares that string with the pszContentType. The comparison is not case sensitive

Definition at line 540 of file shelwapi.cpp.

References GetModule().

◆ IsDirectory()

BOOL owl::TSHPath::IsDirectory ( LPCTSTR pszPath)
static

Verifies that a path is a valid directory.

Definition at line 452 of file shelwapi.cpp.

References GetModule().

◆ IsDirectoryEmpty()

BOOL owl::TSHPath::IsDirectoryEmpty ( LPCTSTR pszPath)
static

Determines whether or not a specified path is an empty directory.

Definition at line 460 of file shelwapi.cpp.

References GetModule().

◆ IsFileSpec()

BOOL owl::TSHPath::IsFileSpec ( LPCTSTR pszPath)
static

Searches 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

Definition at line 468 of file shelwapi.cpp.

References GetModule().

◆ IsLFNFileSpec()

BOOL owl::TSHPath::IsLFNFileSpec ( LPCTSTR lpName)
static

Determines whether or not a file name is in long format.

Definition at line 428 of file shelwapi.cpp.

References GetModule().

◆ IsNetworkPath()

BOOL owl::TSHPath::IsNetworkPath ( LPCTSTR pszPath)
static

Determines whether a path string represents a network resource.

Definition at line 516 of file shelwapi.cpp.

References GetModule().

◆ IsPrefix()

BOOL owl::TSHPath::IsPrefix ( LPCTSTR pszPrefix,
LPCTSTR pszPath )
static

Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix.

A prefix is one of these types: "C:\\", ".", "..", "..\"

Definition at line 476 of file shelwapi.cpp.

References GetModule().

◆ IsRelative()

BOOL owl::TSHPath::IsRelative ( LPCTSTR pszPath)
static

Searches a path and determines if it is relative.

Definition at line 484 of file shelwapi.cpp.

References GetModule().

◆ IsRoot()

BOOL owl::TSHPath::IsRoot ( LPCTSTR pszPath)
static

Parses a path to determine if it is a directory root.

Definition at line 492 of file shelwapi.cpp.

References GetModule().

◆ IsSameRoot()

BOOL owl::TSHPath::IsSameRoot ( LPCTSTR pszPath1,
LPCTSTR pszPath2 )
static

Compares two paths to determine if they have a common root component.

Definition at line 500 of file shelwapi.cpp.

References GetModule().

◆ IsSystemFolder()

BOOL owl::TSHPath::IsSystemFolder ( LPCTSTR pszPath,
DWORD dwAttrb )
static

Determines if an existing folder contains the attributes that make it a system folder.

Alternately indicates if certain attributes qualify a folder to be a system folder

Definition at line 708 of file shelwapi.cpp.

References GetModule().

◆ IsUNC()

BOOL owl::TSHPath::IsUNC ( LPCTSTR pszPath)
static

Determines if the string is a valid UNC (universal naming convention) for a server and share path.

Definition at line 508 of file shelwapi.cpp.

References GetModule().

◆ IsUNCServer()

BOOL owl::TSHPath::IsUNCServer ( LPCTSTR pszPath)
static

Determines if a string is a valid UNC (universal naming convention) for a server path only.

Definition at line 524 of file shelwapi.cpp.

References GetModule().

◆ IsUNCServerShare()

BOOL owl::TSHPath::IsUNCServerShare ( LPCTSTR pszPath)
static

Determines if a string is a valid universal naming convention (UNC) share path, \\server\share.

Definition at line 532 of file shelwapi.cpp.

References GetModule().

◆ IsURL()

BOOL owl::TSHPath::IsURL ( LPCTSTR pszPath)
static

Tests a given string to determine if it conforms to a valid URL format.

Definition at line 548 of file shelwapi.cpp.

References GetModule().

◆ MakePretty()

BOOL owl::TSHPath::MakePretty ( TCHAR * pszPath)
static

Converts a path to all lowercase characters to give the path a consistent appearance.

Definition at line 556 of file shelwapi.cpp.

References GetModule().

◆ MakeSystemFolder()

BOOL owl::TSHPath::MakeSystemFolder ( LPCTSTR pszPath)
static

Gives an existing folder the proper attributes to become a system folder.

Definition at line 692 of file shelwapi.cpp.

References GetModule().

◆ MatchSpec()

BOOL owl::TSHPath::MatchSpec ( LPCTSTR pszFile,
LPCTSTR pszSpec )
static

Searches a string using a DOS wild card match type.

Definition at line 564 of file shelwapi.cpp.

References GetModule().

◆ ParseIconLocation()

int owl::TSHPath::ParseIconLocation ( TCHAR * pszIconFile)
static

Parses a file location string containing a file location and icon index, and returns separate values.

Definition at line 572 of file shelwapi.cpp.

References GetModule().

◆ QuoteSpaces()

void owl::TSHPath::QuoteSpaces ( TCHAR * lpsz)
static

Searches a path for spaces.

If spaces are found, the entire path is enclosed in quotation marks

Definition at line 580 of file shelwapi.cpp.

References GetModule().

◆ RelativePathTo()

BOOL owl::TSHPath::RelativePathTo ( TCHAR * pszPath,
LPCTSTR pszFrom,
DWORD dwAttrFrom,
LPCTSTR pszTo,
DWORD dwAttrTo )
static

Creates a relative path from one file or folder to another.

Definition at line 588 of file shelwapi.cpp.

References GetModule().

◆ RemoveArgs()

void owl::TSHPath::RemoveArgs ( TCHAR * pszPath)
static

Removes any arguments from a given path.

Definition at line 596 of file shelwapi.cpp.

References GetModule().

◆ RemoveBackslash()

TCHAR * owl::TSHPath::RemoveBackslash ( TCHAR * pszPath)
static

Removes the trailing backslash from a given path.

Definition at line 604 of file shelwapi.cpp.

References GetModule().

◆ RemoveBlanks()

void owl::TSHPath::RemoveBlanks ( TCHAR * pszPath)
static

Removes all leading and trailing spaces from a string.

Definition at line 612 of file shelwapi.cpp.

References GetModule().

◆ RemoveExtension()

void owl::TSHPath::RemoveExtension ( TCHAR * pszPath)
static

Removes the file extension from a path, if there is one.

Definition at line 620 of file shelwapi.cpp.

References GetModule().

◆ RemoveFileSpec()

BOOL owl::TSHPath::RemoveFileSpec ( TCHAR * pszPath)
static

Removes the trailing file name and backslash from a path, if it has them.

Definition at line 628 of file shelwapi.cpp.

References GetModule().

◆ RenameExtension()

BOOL owl::TSHPath::RenameExtension ( TCHAR * pszPath,
LPCTSTR pszExt )
static

Replaces the extension of a file name with a new extension.

If the file name does not contain an extension, the extension will be attached to the end of the string

Definition at line 636 of file shelwapi.cpp.

References GetModule().

◆ SearchAndQualify()

BOOL owl::TSHPath::SearchAndQualify ( LPCTSTR pszPath,
TCHAR * pszBuf,
UINT cchBuf )
static

Determines if a given path is correctly formatted and fully qualified.

Definition at line 644 of file shelwapi.cpp.

References GetModule().

◆ SetDlgItemPath()

void owl::TSHPath::SetDlgItemPath ( HWND hDlg,
int id,
LPCTSTR pszPath )
static

Sets the text of a child control in a window or dialog box, using PathCompactPath to make sure the path fits in the control.

Definition at line 652 of file shelwapi.cpp.

References GetModule().

◆ SkipRoot()

TCHAR * owl::TSHPath::SkipRoot ( LPCTSTR pszPath)
static

Parses a path, ignoring the drive letter or UNC server/share path parts.

Definition at line 660 of file shelwapi.cpp.

References GetModule().

◆ StripPath()

void owl::TSHPath::StripPath ( TCHAR * pszPath)
static

Removes the path portion of a fully qualified path and file.

Definition at line 668 of file shelwapi.cpp.

References GetModule().

◆ StripToRoot()

BOOL owl::TSHPath::StripToRoot ( TCHAR * pszPath)
static

Removes all parts of the path except for the root information.

Definition at line 676 of file shelwapi.cpp.

References GetModule().

◆ Undecorate()

void owl::TSHPath::Undecorate ( TCHAR * pszPath)
static

Removes the decoration from a path string.

Definition at line 716 of file shelwapi.cpp.

References GetModule().

◆ UnExpandEnvStrings()

BOOL owl::TSHPath::UnExpandEnvStrings ( LPCTSTR pszPath,
TCHAR * pszBuf,
UINT cchBuf )
static

Takes a fully qualified path, and replaces several folder names with their associated environment string.

Definition at line 725 of file shelwapi.cpp.

References GetModule().

◆ UnExpandEnvStringsForUser()

BOOL owl::TSHPath::UnExpandEnvStringsForUser ( HANDLE hToken,
LPCTSTR pszPath,
TCHAR * pszBuf,
UINT cchBuf )
static

Definition at line 733 of file shelwapi.cpp.

References GetModule().

◆ UnmakeSystemFolder()

BOOL owl::TSHPath::UnmakeSystemFolder ( LPCTSTR pszPath)
static

Removes the attributes from a folder that make it a system folder.

This folder must actually exist in the file system

Definition at line 700 of file shelwapi.cpp.

References GetModule().

◆ UnquoteSpaces()

void owl::TSHPath::UnquoteSpaces ( TCHAR * lpsz)
static

Removes quotes from the beginning and end of a path.

Definition at line 684 of file shelwapi.cpp.

References GetModule().


The documentation for this class was generated from the following files: