Description:-

This is used to determine whether a directory exists either on disk or in memory.

directoryExists( path );

This function returns a boolean value.

Attributes:-

path:- This is a required attribute, the path of a directory location, an absolute on-disk or in-memory path. Alternatively, you can specify the IP address as in the bellow example:
directoryExists( "//192.168.0.1/new_disc/test" );

Example:-

In this example, we will check the d:\files\documents\ directory exists in Windows.

<cfscript>
    writeOutput( directoryExists( "d:\files\documents\" ) );
</cfscript>

Result:-

YES

In our system this d:\files\documents\ directory present that’s why it returns true.