< XQuery
Motivation
You would like to interact with a remote FTP server running remotely directly from your XQuery program. You would like to perform operations such as list, get and put files.
FTP Module Interfaces
The FTP module has the following interfaces:
ftpclient:get-connection($host as xs:string, $username as xs:string, $password as xs:string) xs:long? ftpclient:list($connection-handle as xs:long, $remote-directory as xs:string) document-node()? ftpclient:get-binary-file($connection-handle as xs:long, $remote-directory as xs:string, $file-name as xs:string) xs:base64Binary? ftpclient:send-binary-file($connection-handle as xs:long, $remote-directory as xs:string, $file-name as xs:string, $data as xs:base64Binary) xs:boolean
Sample Usage
In this example we will open a connection to a remote FTP server, login and list the files.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.