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
cffiletag. 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 forAppendandWrite; 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access