Loading...
 

CX_SYSTEM_OBJECT::CanonicalizePath

CX_SYSTEM_OBJECT::CanonicalizePath

199720

Description:

The function simplifies a path containing "." or/and "..." (example: CX_ROOTDIR\\\appswh\\\\..) CX_ROOTDIR is replaced by the correct path.

Code example:
Var(path, cPath) "CX_ROOTDIR\\" -> path path "appswh\\" + -> cPath cPath <span class="highlight">SystemObject Call(CanonicalizePath)</span> \\ Output: "C:\\classix\\Evaluate\\appswh\\" "path "appswh\\." + -> cPath cPath <span class="highlight">SystemObject Call(CanonicalizePath)</span> \\ Output: "C:\\classix\\Evaluate\\appswh" "path "appswh\\.." + -> cPath cPath <span class="highlight">SystemObject Call(CanonicalizePath)</span> \\ Output: "C:\\classix\\Evaluate" "C:\\" -> path "path "." + -> cPath cPath <span class="highlight">SystemObject Call(CanonicalizePath)</span> \\ Output: "C:\\" "path ".." + -> cPath cPath <span class="highlight">SystemObject Call(CanonicalizePath)</span> \\ Output: "C:\\"

The correct path of CX_ROOTDIR may differ from the one in the code example.
The system does not check whether the entered path exists.
A path constructed with "/" instead of "\" cannot be transformed with this function

Stack

Stack Position Object type Brief description
Stack(In) Top STRING Name of the path to be simplified
Stack(Out) Top STRING Simplified path
Function call: Call(CanonicalizePath)