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")

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