Aegis Kleais wrote:
<cfdump var="#fileExists( expandPath( '/path/to/models/utils/Config.cfc' ) )#" /> <!--- This dumps YES. --->
<cfset this.mappings[ '/model' ] = expandPath( '/path/to/models/' ) /> <!--- Same as c:\web-root\path\to\models\ --->
<cfdump var="#fileExists( expandPath( '/model/utils/Config.cfc' ) )#" /> <!--- This dumps NO. I've yet to figure out why. --->
CF documentation states that fileExists() should work with in-memory addresses, but I don't know if that means 'mappings'.
I think the second fileExists() call fails because ColdFusion interpretes the argument in expandPath as literally a relative path. Hence, assuming the current directory is c:\web-root,
expandPath( '/path/to/models/utils/Config.cfc' ) has the value c:\web-root\path\to\models\utils\Config.cfc
and
expandPath( '/model/utils/Config.cfc' ) has the value c:\web-root\model\utils\Config.cfc