githubEdit

GetCanonicalPath

Returns the canonical path of a file, resolving all relative path elements and symlinks

Method Signature

GetCanonicalPath(path=[string])

Arguments

Argument
Type
Required
Description
Default

path

string

true

The file or directory path string

Examples

getCanonicalPath Example

Returns the canonical path of the input path.

Run Examplearrow-up-right

writeOutput( getCanonicalPath( getBaseTemplatePath() ) );

Additional Examples

Run Examplearrow-up-right

base_path = getBaseTemplatePath();
canonical = getCanonicalPath( base_path );
dump( canonical );
 // /var/task

Last updated

Was this helpful?