3-1-Tags:CFFile
last edited by
lmajano
on 23-Aug-2009
cffile
Description
Handles all interactions with files. The attributes you use with cffile depend on the value of the action attribute. For example, if the action = "write", use the attributes associated with writing a text file.
Category
Other
Implemented
Usage Syntax
<cffile [acl="String"] action="String" [serverpassword="String"] [source="String"] [attributes="String"] [destination="String"] [mode="String"] [filefield="String"] [charset="String"] [nameconflict="String"] [accept="String"] [file="String"] [variable="String"] [output="Any"] [addNewLine="Boolean"] [fixnewline="Boolean"] [result="String"] />
[] = Optional attribute
Attributes
| Name | Type | Required | Default | Description |
| acl | String | No | only used for S3 Resources | |
| action | String | Yes | Type of file manipulation that the tag performs. | |
| serverpassword | String | No | allow you to access filesystem, also when access is denied for your context | |
| source | String | No | Absolute pathname of file on web server. On Windows, use backward slashes; on UNIX, use forward slashes. | |
| attributes | String | No | One attribute (Windows) or a comma-delimited list of attributes (other platforms) to set on the file. If omitted, the file's attributes are maintained. | |
| destination | String | No | Absolute pathname of directory or file on web server. | |
| mode | String | No | Applies only to Solaris and HP-UX. Permissions. Octal values of UNIX chmod command. Assigned to owner, group, and other, respectively. | |
| filefield | String | No | Name of form field used to select the file. | |
| charset | String | No | Character set name for the file contents. | |
| nameconflict | String | No | Action to take if filename is the same as that of a file in the directory. | |
| accept | String | No | Limits the MIME types to accept. Comma-delimited list. For example, to permit JPG and Microsoft Word file uploads: accept = "image/jpg, application/msword" The browser uses file extension to determine file type. | |
| file | String | No | Absolute pathname of file on web server. | |
| variable | String | No | Name of variable to contain contents of text file. | |
| output | Any | No | Content of the file to be created. | |
| addNewLine | Boolean | No | Yes: appends newline character to text written to file | |
| fixnewline | Boolean | No | ||
| result | String | No | Name of the result value (default:cffile) |
SideBar
User Login
Comments (