Adobe COLDFUSION 9 Manual page 276

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
• cfpresentation
• cfprint
• cfreport
• cfzip
Example using the tag cfcontent
<cfcontent file="ram:///a.jpg" type="image/jpeg" deletefile="yes">
Adding permissions
ColdFusion lets you add permissions for directories/files on RAM using an existing sandbox security setup. You can
only set up sandbox security for disk directories and not for RAM directories. Access to an in-memory directory/file
can be restricted only through an existing local file system sandbox.
Therefore, to set up sandbox security for in-memory files, select a sandbox that you have already configured for a disk
directory.
By default the
directories are included in the list of secured folders and have read, write, execute, and delete
ram:///
permissions set. Therefore, all RAM files have permissions by default in a sandbox. All the security restrictions that
apply to disk files apply to in-memory files.
To set up Sandbox security for in-memory files,
1
Open the Security > Sandbox Security page in the ColdFusion Administrator.
The Sandbox Security Permissions page appears.
2
In the Add Security Sandbox box, specify a disk directory and then click Add.
In Files/Directories, specify the in-memory file path. For example,
3
ram:///a/b/dynamic.cfm
Select the required permissions, click Add Files/Paths, and then click Finish.
4
For further details on sandbox security, refer to the ColdFusion Administration Guide.
Accessing VFS information
The
function lets you access VFS information. This function takes the parameter RAM as input.
GetVFSMetaData
This function returns a structure that contains the following information:
• If support for in-memory virtual file system is enabled
• Memory limit in bytes for in-memory virtual file system
• The used and free memory
For example,
<cfdump var="#getVFSMetaData("ram")#">
Note: The Settings page of the ColdFusion Administrator has the options to enable/disable the in-memory virtual file
system support. You can also specify the memory limit in Megabytes (MB) for in-memory virtual file system.
Deleteing in-memory files
The in-memory files remain in RAM as long as the server is up. When required, clean up the files using
cffile/cfdirectory with the
action=delete
the following code:
<cfdirectory action="delete" directory="ram:///a/b" recurse="yes">
(for file).
. For example, delete all the contents in RAM directory
Last updated 8/5/2010
(for directory) or
ram:///a/b
"ram://a/b"
271
using

Advertisement

Table of Contents
loading

Table of Contents