MACROMEDIA COLDFUSION MX 61-CFML Reference page 143

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

The
cfftp.returnValue
getCurrentDir
getCurrentURL
existsDir
existsFile
exists
For more information, see Developing ColdFusion MX Applications.
Caution: Object (file and directory) names are case-sensitive.
Action (cfftp.ReturnValue variable)
The results of an action determine the value of the
cfftp action
getCurrentDir
getCurrentURL
existsDir
existsFile
exists
Example
The following example opens a connection and gets a file listing showing file or directory name,
path, URL, length, and modification date.
<p>Open a connection
<cfftp connection = "myConnection"
username = "myUserName"
password = "myUserName@allaire.com"
server = "ftp.allaire.com"
action = "open"
stopOnError = "Yes">
<p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
<cfftp connection = "myConnection"
action = "LISTDIR"
stopOnError = "Yes"
name = "ListDirs"
directory = "/">
<p>FTP Directory Listing:<br>
<cftable query = "ListDirs" HTMLTable = "Yes" colHeaders = "Yes">
<cfcol header = "<b>Name</b>" text = "#name#">
<cfcol header = "<b>Path</b>" text = "#path#">
<cfcol header = "<b>URL</b>" text = "#url#">
<cfcol header = "<b>Length</b>" text = "#length#">
<cfcol header = "<b>LastModified</b>"
text = "#DateFormat(lastmodified)#">
<cfcol header = "<b>IsDirectory</b>" text = "#isdirectory#">
</cftable>
<p>Close the connection:
<cfftp connection = "myConnection"
variable provides the return value for these actions:
Value of cfftp.returnValue
String. Current directory.
String. Current URL.
Yes or No.
Yes or No.
Yes or No.
cfftp.returnValue
cfftp: Connection: File and directory operations
variable.
143

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents