MACROMEDIA COLFUSION MX 7-CFML Reference page 148

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

This example shows the use of the
permissions rw-r--r-- (owner = read/write, group = read, other = read):
<cffile action = "write"
file = "/tmp/foo"
mode = 644>
This example appends to the file and sets permissions to read/write (rw) for all:
<cffile action = "append"
destination = "/home/tomj/testing.txt"
mode = 666
output = "Is this a test?">
This example uploads a file and gives it the permissions owner/group/other = read/write/execute):
cffile action = "upload"
fileField = "fieldname"
destination = "/tmp/program.exe"
mode = 777>
This example uses the
, which is derived from
xmlString
<cfxml variable="xmlData">
<docroot>
<payload type="string">This is some plain text</payload>
</docroot>
</cfxml>
<cfset xmlString = toString(xmlData)>
<cfset key = createUUID()>
<cfset encString=encrypt(xmlString, key)>
<cffile action="write" addnewline="yes"
file="C:\CFusionMX7\wwwroot\test\store.dat" output="#encString#"
fixnewline="yes">
<cffile action="read" file="C:\CFusionMX7\wwwroot\test\store.dat"
variable="retrievedString">
<cfset decString=decrypt(retrievedString, key)>
<cfdump var="#decString#">
<cfset newXML = xmlParse(decString)>
<cfdump var="#newXML#">
148
Chapter 2: ColdFusion Tags
attribute for UNIX. It creates the file /tmp/foo with
mode
attribute to changes embedded line-ending characters in
fixnewline
, to operating-system specific line endings.
xmlData

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents