www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
dav add & update fun...
dav lock manipulatio...
dav manipulation fun...
dav search functions
dav_exp
lfs_exp
serv_queue_top
urlrewrite_create_re...
user_key_load
vhost_define
vhost_remove
webdav users & group...
client_attr
connection_get
connection_id
connection_is_dirty
connection_set
connection_vars
connection_vars_set
dbname
ftp_get
ftp_ls
ftp_put
get_certificate_info
get_keyword
get_keyword_ucase
http
http_acl_get
http_acl_remove
http_acl_set
http_body_read
http_client
http_client_ext
http_client_ip
http_debug_log
http_enable_gz
http_file
http_flush
http_get
http_header
http_header_get
http_kill
http_listen_host
http_lock
http_map_get
http_map_table
http_param
http_path
http_pending_req
http_physical_path
http_proxy
http_request_get
http_request_header
http_request_status
http_rewrite
http_root
http_unlock
http_url
http_value
http_xslt
json_parse
ses_connect
ses_disconnect
ses_read_line
ses_write
tcpip_gethostbyaddr
tcpip_gethostbyname
vsp_calculate_digest
wsdl_import_udt
XML
XPATH & XQUERY

Functions Index

ftp_get

FTP get command; Virtuoso FTP client
integer ftp_get (in server varchar, in user varchar, in pass varchar, in remote_file_name varchar, in local_file_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 get 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_file_name – Full path and file name to the file on the FTP server to be downloaded.
local_file_name – The full path and file name of the local save point. This is relative to the server root directory. This directory must be included in DirsAllowed ACL list in the Virtuoso.INI file.
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 the size of the file written to the local file system.

Errors

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

Examples
Retrieving a file from an FTP server

To get the file virtuoso30.tar.gz from the ftp server ftp.openlinksw.com, one can use:

select ftp_get ('ftp.openlinksw.com', 'user_name', 'password', 'virtuoso30.tar.gz', 'virtuoso30.tar.gz');

This will download the file which occurs on the root directory of the server, and save it to the local server root directory.

See Also

ftp_put()

ftp_ls()