O'Reilly logo

Programming ColdFusion MX, 2nd Edition by Rob Brooks-Bilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 are Append, Copy, Delete, Move, Read, ReadBinary, Rename, Upload, and Write.

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 for Append and Write; ignored otherwise. The default is Yes.

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, and ReadOnly. Previous versions supported the additional attributes Archive, System, and Temporary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required