normalizeFilePath(filePath)
Last updated September 9, 2008
Version: 0 | Requires: ColdFusion MX | Library: FileSysLib
Description:
Turns c:\path\/to//dir/../other into c:\path\to\other - file or directory must already exist.
Return Values:
Returns a string.
Example:
Parameters:
| Name | Description | Required |
|---|---|---|
| filePath | The file path to format. | Yes |
Full UDF Source:
<cfscript>
/**
* normalizes a file path to remove invalid slashes and extra dots.
*
* @param filePath The file path to format. (Required)
* @return Returns a string.
* @author S. Isaac Dealey (info@turnkey.to)
* @version 0, September 9, 2008
*/
function normalizeFilePath(filePath) {
return CreateObject("java","java.io.File").init(filePath).getCanonicalPath();
}
</cfscript>
Search CFLib.org
Latest Additions
Robby Lansaw added
getComponentProp...
3 day(s) ago
Dave Anderson added
iniToStruct
25 day(s) ago
Dave Anderson added
deDupeArray
25 day(s) ago
Richard added
dice
27 day(s) ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)