CFLib.org – Common Function Library Project

makeDirs(p)

Last updated September 21, 2004

Version: 1 | Requires: ColdFusion MX | Library: FileSysLib

 
Rated 9 time(s). Average Rating: 4.9

Description:
It will create all non existant directories in a path withouth looping by using java.io.File class.

Return Values:
Returns nothing.

Example:

view plain print about
#makeDirs('c:\www\grandpa\parent\son')#

Parameters:

Name Description Required
p The path to create. Yes

Full UDF Source:

view plain print about
<cfscript>
/**
 * Create all non exitant directories in a path.
 * 
 * @param p      The path to create. (Required)
 * @return Returns nothing. 
 * @author Jorge Iriso (jiriso@fitquestsl.com) 
 * @version 1, September 21, 2004 
 */

function makeDirs(p){
    createObject("java""java.io.File").init(p).mkdirs();
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Robby Lansaw Robby Lansaw added
getComponentProp...
3 day(s) ago

Dave Anderson Dave Anderson added
iniToStruct
25 day(s) ago

Dave Anderson Dave Anderson added
deDupeArray
25 day(s) ago

Richard Richard added
dice
27 day(s) ago

Top Rated

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 22 time(s)

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Raymond Camden highlightAndCrop
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson