User Guide

Table Of Contents
Using cfdirectory 1013
mode (UNIX only) The octal value representing the permissions setting for the specified
directory.
Note: ColdFusion supports the ReadOnly and Hidden values for the attributes attribute for
cfdirectory sorting.
Depending on whether your server is on a UNIX system or a Windows system, either the
Attributes column or the Mode column is empty. Also, you can specify a filename in the
filter
attribute to get information on a single file.
The following procedure describes how to create a ColdFusion page in which to view directory
information.
To view directory information:
1.
Create a ColdFusion page with the following content:
<html>
<head>
<title>List Directory Information</title>
</head>
<body>
<h3>List Directory Information</h3>
<cfdirectory
directory="c:\inetpub\wwwroot\mine"
name="mydirectory"
sort="size ASC, name DESC, datelastmodified">
<table cellspacing=1 cellpadding=10>
<tr>
<th>Name</th>
<th>Size</th>
<th>Type</th>
<th>Modified</th>
<th>Attributes</th>
<th>Mode</th>
</tr>
<cfoutput query="mydirectory">
<tr>
<td>#mydirectory.name#</td>
<td>#mydirectory.size#</td>
<td>#mydirectory.type#</td>
<td>#mydirectory.dateLastModified#</td>
<td>#mydirectory.attributes#</td>
<td>#mydirectory.mode#</td>
</tr>
</cfoutput>
</table>
</body>
</html>