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

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.

Syntax
Pascal
class function MakeCanonic(const pPath: String): string; static;
Parameters 
Description 
const pPath: String 
The Path to normalize 

String: The absolute path for a none rooted path. If the path is already absolute, relative parts will be removed.

roth