getCanonicalPath

Returns the canonical path of the input path. If a directory a trailing slash is used on Lucee, but not on ACF.

getCanonicalPath(path) → returns string

Argument Reference

path string
Required

Compatibility

ColdFusion:

Version 2016.0.7+ Added to ColdFusion 2018 update 1.

Examples
Sample code invoking the getCanonicalPath function

Returns the canonical path of the input path.

writeOutput( getCanonicalPath(getBaseTemplatePath()) );

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub