ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.PathUtils.TPathUtils

Class containing static helper functions in the context of file system paths.

Jam_Shell_PathUtils_TPathUtils
Syntax
Pascal
TPathUtils = class;
 
Name 
Description 
 
Concatenates two strings that represent properly formed paths into one path; also concatenates any relative path elements. When the path is maximum MAX_PATH long the Windows API is used. In all other cases a own implementation is used. Warning: In Windows Vista or later a preappended Unicode path prefix will be removed.
The directory path should be in the form of A:,B:, ..., Z:. The file path should be in a correct form that represents the file part of the path. The file path must not be null, and if it ends with a backslash, the backslash will be maintained.... more 
 
Removes the last character from the given path if it is a path delimiter. 
 
Returns the current working directory. Works like SysUtils.GetCurrentDir, but disables WOW64 redirection.  
 
Returns the current drive of GetCurrentDir.  
 
Extracts the special folder as a root for a given path.  
 
The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to MAX_PATH characters in length. To specify that kind of path, use the "\?" ("\?UNC" for UNC-Path) prefix for paths longer than MAX_PATH chars. This function prepares paths longer than 255 chars with the correct prefix.  
 
Returns true if the char on the given index of the given path is either "" or "/" 
 
Checks if the given path is a symbolic link or similar (= NTFS reparse point) 
 
Returns true if the given path is rooted. This is required since "directory" is considered absolute to the current drive but the target may vary when the current drive is changed.  
 
Checks if the passed path has a Unicode Api call prefix.  
 
Checks if a given string has the form of an URL.  
 
Indicates whether the specified address is a valid IP address.  
 
Indicates whether the specified address is a valid IPv4 address.  
 
Indicates whether the specified address is a valid IPv6 address.  
 
This function will do 4 things:
  1. a path which is not rooted jet will be rooted (E.g.: "\Windows" -> "C:\Windows"; ".Path" -> "<current directoryDir>\Path").
  2. relative parts (".." and ".") will be removed from the path.
  3. if the given path is in 8.3 naming convention (e.g. "C:\Users\ADMINI~\..") it is resolved to its long path name.
  4. adds missing path delimiter after the drive delimiter (e.g.: "C:Temp" -> "C:\Temp").
Warning: In Windows Vista or later a preappended Unicode path prefix will be removed.  
 
Removes relative parts (".." and ".") from the passed path. The ".." sequence indicates to remove a path segment from the current position to the previous path segment. The "." sequence indicates to skip over the next path segment to the following path segment. The root segment of the path cannot be removed. Remark: If there are more ".." sequences than there are path segments, the function returns just the root, "".  
 
Removes relative parts (".." and ".") from the passed path. The ".." sequence indicates to remove a path segment from the current position to the previous path segment. The "." sequence indicates to skip over the next path segment to the following path segment. The root segment of the path cannot be removed. Remark: If there are more ".." sequences than there are path segments, the function returns just the root, "".  
 
The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to MAX_PATH characters in length. To specify that kind of path, use the "\?" ("\?UNC" for UNC-Path) prefix for paths longer than MAX_PATH chars. This function removes the Unicode api call prefix from the passed path prefix.  
 
Returns True if the given path starts with a drive letter.