• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Putting <cfftp> to Use

The core functionality of the <cfftp> tag is transferring files quickly across multiple servers. The potential for this base functionality to assist your applications is limited only by your imagination. The <cfftp> tag can be used to create an FTP interface to your Web sites; to asynchronously syndicate data out to an affiliate site in the form of an HTML or XML document; and to pull a list of available software to download from another Web site and display to users. The rest of this section demonstrates a few of the capabilities of this robust tag.

Displaying Available Files

The code in Listing 21.10 performs directory operations using the <cfftp> tag while connected to Mozilla's FTP site. This code retrieves a file listing and displays the results. It also uses ColdFusion's error handling by setting the throwOnError attribute to YES, and leverages connection caching to maintain a connection to the server during directory and file operations.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint