Checking if the directory exists

You can check if the directory exists by using the directoryExists function as shown in the following example:

<cfset existresponse=cfclient.file.directoryExists("myNewDir")>
<cfif existresponse >
<!---Directory Exists --->
</cfif>


Method summary

directoryExists (path)

  • Params
    • path An absolute or relative path of the directory (including directory name).

Returns – a Boolean value indicating the existence of the specified directory

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy