View the file in the browser, enter values, and submit the form.
4
The appended information displays at the end of the text file.
Using cfdirectory
Use the
cfdirectory
delete, and rename directories.
As with
, you can disable
cffile
For details on the syntax of this tag, see CFML Reference.
Returning file information
When you use the
specified in the
name
attribute setting. This query object contains five result columns that you can reference in a
tag, using the
cfoutput
•
name
Directory entry name.
•
size
Directory entry size.
•
type
File type: File or Dir.
•
dateLastModified
•
attributes
(Windows only) File attributes, if applicable.
•
mode
(UNIX only) The octal value representing the permissions setting for the specified
directory.
Note: ColdFusion supports the ReadOnly and Hidden values for the
sorting.
cfdirectory
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
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:
Create a ColdFusion page with the following content:
1
<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>
828
Chapter 37: Managing Files on the Server
tag to return file information from a specified directory and to create,
cfdirectory
attribute setting,
action="list"
attribute. The
name
attribute:
name
Date an entry was last modified.
processing in the ColdFusion MX Administrator.
cfdirectory
attribute is required when you use the
returns a query object as
action="list"
attribute for
attributes
filter
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers