Last updated on
Apr 27, 2021
|
Also applies to ColdFusion
Listing a directory
You can list the content of a directory using the listDirectory function.
<cfset dircontent= cfclient.file.listDirectory(“myNewDir” )> |
Method summary
listDirectory(dirPath) - lists contents of directory specified by dirPath
- returns – An array of FileEntry and DirectoryEntry objects
- params
- dirPath – Absolute or relative path of the directory to be listed (including the directory name).
- sortType - A string representing the type of directory sorting. For instance ("name ASC/DESC", "datemodified ASC/DESC")