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 Example

writeOutput( getCanonicalPath( getBaseTemplatePath() ) );

Additional Examples

Run Example

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

Last updated

Was this helpful?