Using <CFDIRECTORY>

After you're familiar with <CFFILE>'s file-management ACTIONs, the companion tag <CFDIRECTORY> is a breeze to master. It supports only four ACTIONs, as listed in Table 18.4. All the ACTIONs use the associated attribute DIRECTORY to specify the directory or folder on which to act.

Table 18.4. ACTIONs Supported by <CFDIRECTORY>
ACTION What It Does
create Creates a new directory with the name specified in the attribute DIRECTORY
delete Deletes the directory named in DIRECTORY
list Lists the contents of specified DIRECTORY. This ACTION also accepts the optional attributes FILTER and SORT to determine file types to list, or sorting order, respectively.
rename Renames DIRECTORY to the required attribute specified in NEWDIRECTORY ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.