User Guide

Table Of Contents
1002 Chapter 40: Interacting with Remote Servers
Example: caching a connection
<cflock scope="Session" timeout=10>
<cfftp action="Open"
username="anonymous"
password="me@home.com"
server="ftp.eclipse.com"
connection="Session.myconnection">
</cflock>
In this example, the connection cache remains available to other pages within the current session.
You must enable session variables in your application for this approach to work, and you must
lock code that uses session variables. For more information on locking, see Chapter 15, “Using
Persistent Data and Locking,” on page 339.
Note: Changing a connection’s characteristics, such the retrycount or timeout values, might require
you to re-establish the connection.
Connection actions and attributes
The following table shows the available
cfftp actions and the attributes they require when you
use a named (that is, cached) connection. If you do not specify an existing connection name, you
must specify the
username, password, and server attributes.
.
Action Attributes Action Attributes
Open none Rename existing
new
Close none Remove server
item
ChangeDir directory GetCurrentDir none
CreateDir directory GetCurrentURL none
ListDir name
directory
ExistsDir directory
RemoveDir directory ExistsFile remotefile
GetFile localfile
remotefile
Exists item
PutFile localfile
remotefile