ColdFusion 9.0 Resources |
DirectoryCreateDescriptionCreates on-disk or in-memory directory. CategoryFunction SyntaxDirectoryCreate(path) HistoryColdFusion 9: Added this function Parameters
UsageEnsure that you have the required permissions to run this function. ExampleThe following code illustrates how to create a directory: <h2>DirectoryCreate Example</h2> <h3>Enter a directory to create.</h3> <cfform action = "directorycreate.cfm" method="post" preservedata="true" > <cfinput type = "text" required="true" name = "createDirectory"> <br> <cfinput type = "submit" value="submit" name = "submit"> </cfform> <cfif IsDefined("FORM.createDirectory")> <cfif FORM.createDirectory is not ""> <cfset createDirectory = FORM.createDirectory> <cftry> <cfset DirectoryCreate(createDirectory)> <cfoutput><b>Directory #createDirectory# successfully created.</b></cfoutput> <cfcatch> <b>Error Message:</b><cfoutput>#cfcatch.message#</cfoutput><br/> <b>Error Detail:</b><cfoutput>#cfcatch.Detail#</cfoutput> </cfcatch> </cftry> </cfif> </cfif> |