Name

ftp_ls — FTP dir command; Virtuoso FTP client

Synopsis

any ftp_ls ( in server varchar ,
  in user varchar ,
  in pass varchar ,
  in remote_dir_name varchar ,
  in is_pasv integer );
 

Description

Virtuoso has FTP client functionality, that can be used inside Virtuoso/PL. This Virtuoso function mimics the FTP dir command. As with any PL, this can be combined with Web Services and SOAP.

Parameters

server

The remote server address or IP Address.

user

The username for authentication at the FTP server.

pass

The accompanying password for authentication at the FTP server.

remote_dir_name

The full path of the remote directory to list the contents of.

is_pasv

Flag to specify whether to use passive mode. This can be one "1" for passive mode, or zero "0" for active mode. One "1" is assumed by default.

Return Types

This function returns a vector of descriptions from the result of performing the dir command on the remote server. If errors occur then these will be returned instead.

Errors

This function will return any errors returned by the remote FTP server.

Examples

Example 24.120. Listing files on the remote FTP server

The following command will send the vector of the descriptions of the files in the virtuoso30 directory on the remote sever to the Virtuoso debug console, assuming the server was started with the -d or +debug option:

select dbg_obj_print(ftp_ls ('ftp.openlinksw.com', 'user_name', 'password', 'virtuoso30'));