Name
cffile
Synopsis
<cffile>
Operates on files on the
ColdFusion server. The action taken depends on the
action
attribute. Append
appends additional text to the end of a file. Copy
copies a file from one location to another. Delete
deletes a file from the server. Move
moves a file
from one location to another. Read
reads a text
file and stores the contents in a variable.
ReadBinary
reads a binary file and stores the data
as a byte-array, allowing both string and array functions to be used
to manipulate the data. Rename
renames a file on
the server. Upload
uploads a file from a form
submission. Write
writes a text or binary file to
the server.
Attributes
-
action="
action
"
The action to be performed by the
cffile
tag. Required. Possible actions areAppend
,Copy
,Delete
,Move
,Read
,ReadBinary
,Rename
,Upload
, andWrite
.-
accept="
MIME_types
"
A comma-separated list of MIME types that the ColdFusion server should be allowed to accept for upload. Optional for
Upload
; ignored otherwise. The default is to accept all MIME types.-
addnewline="Yes|No"
If set to
Yes
, a newline character is added to the end of the file. Optional forAppend
andWrite
; ignored otherwise. The default isYes
.-
attributes="
attributes
"
Single attribute for Windows, or comma-delimited list of attributes for other operating systems, to be applied to the file. In ColdFusion MX, valid choices are
Hidden
,Normal
, andReadOnly
. Previous versions supported the additional attributesArchive
,System
, andTemporary ...
Get Programming ColdFusion MX, 2nd Edition 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.