Lists the contents of on-disk or in-memory directory. Also lists the contents of the sub-directories if
recurse is set to
Contents of the directory based on the parameter
listInfo="query", query object
listInfo="name",array of names
listInfo="path", array of path
DirectoryList(path [,recurse] [,listInfo] [,filter] [,sort] [,type] )
ColdFusion 11: Added the type argument.
The absolute path of the directory for which to list the contents. Alternatively, you can specify IP address as in the following example:
Whether ColdFusion performs the action on subdirectories: If
File extension filter applied to returned names, for example, *.cfm. Multiple filters can be applied by using a pipe delimiter. For example: *.beer|*.cookies
Also, you can pass a function in the filter argument:
The arguments of the passed functions must have:
Additionally, it can also accept the instances of Java FileFilter Objects.
Query columns by which to sort a directory listing. Delimited list of columns from query output.To qualify a column, use one of the following values:
Ensure that you have the required permissions to run this function.
The following code dumps the contents of a directory: