CFLib.org – Common Function Library Project

getMapDirectory(name)

Last updated February 18, 2004

author

Joseph Flanigan

Version: 1 | Requires: CF6 | Library: UtilityLib

Description:
Uses the coldfusion.server.ServiceFactory to obtain the directory path for a CF mappings logical path by passing in the name of the logical path.

Return Values:
Returns a string.

Example:

<cfoutput>
getMapPath: #getMapDirectory("/CFIDE")# 
</cfoutput>

Parameters:

Name Description Required
name Mapping name to translate. Yes

Full UDF Source:

<!---
 Gets the directory path for CF mapping logical path.
 
 @param name 	 Mapping name to translate. (Required)
 @return Returns a string. 
 @author Joseph Flanigan (joseph@switch-box.org) 
 @version 1, February 18, 2004 
--->
<cffunction name="getMapDirectory" returntype="string" output="false">
	<cfargument name="name" type="string" required="yes">
	<cfset factory = CreateObject("java", "coldfusion.server.ServiceFactory")>
 	<cfreturn StructFind(factory.RuntimeService.getMappings(),Arguments.name)>
</cffunction>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson