GetDirectoryFromPath() - get a directory from an absolute path
GetDirectoryFromPath.cfm
<!DOCTYPE html">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GetDirectoryFromPath function example: how to get a directory from an absolute path</title>
</head>
<body>
<h2 style="color:Crimson">GetDirectoryFromPath Function Example</h2>
<cfset CurrentTemplatePath=GetCurrenttemplatePath()>
<cfset CurrentDirectory=GetDirectoryFromPath(CurrentTemplatePath)>
<cfoutput>
<b>Current Template Path:</b> #CurrentTemplatePath#
<br />
<b>Current Directory:</b> #CurrentDirectory#
</cfoutput>
</body>
</html>
- GetBaseTemplatePath() - get the absolute path of an application's base page
- GetContextRoot() - get the path of J2EE server context root for the current request
- GetCurrentTemplatePath() - get the current template path who call this function
- GetFileFromPath() - get a file name from an absolute path
- GetFileInfo() - get information about a file
- GetHTTPRequestData() - get HTTP request data (content, headers, method, protocol)
- SetLocale() - set the country language local for coldfusion processing and the page returned to the client
- GetMetricData() - get server performance metrics
- GetPageContext() - get the current coldfusion page context object