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_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_url
http_value
http_xslt
ses_connect
ses_disconnect
ses_read_line
ses_write
tcpip_gethostbyaddr
tcpip_gethostbyname
vsp_calculate_digest
wsdl_import_udt
XML
XPATH & XQUERY

Functions Index

DAV add & update functions

functions for adding, updating, deleting of DAV collections or resources
integer DAV_COL_CREATE (in path varchar, in permissions varchar, in uname varchar, in gname varchar, in auth_uname varchar, in auth_pwd varchar);
integer DAV_DELETE (in path varchar, in silent integer, in auth_uname varchar, in auth_pwd varchar);
varchar DAV_RES_UPLOAD (in path varchar, in content any, in type varchar, in permissions varchar, in uname varchar, in gname varchar, in auth_uname varchar, in auth_pwd varchar);
Description

DAV_COL_CREATE creates a new collection on path, with supplied security permissions, returning a collection id (COL_ID) upon success.

DAV_RES_UPLOAD creates or replaces an existing resource on path with content, mime type and supplied security permissions. Returns a resource id (RES_ID) on success.

DAV_DELETE Removes an existing collection/resource. If silent is set to a nonzero value, no errors codes will be returned. returns 1 on success.

Parameters
path – Collection (directory) path and name of destination of upload.
content – The resource data to upload.
type – Mime type of the uploaded resource. Defaults to '' if not supplied.
permissions – Access permission string of Dav collection or resource. Defaults to '110100000R' if not supplied.
silent – If non-zero, no errors will be returned. Default is 0, meaning errors are returned.
uname – Owner user name. Default is 'dav'.
group name – Owner group name. Default is 'dav'.
auth_uname – Name of administration user capable of performing the operation. default is null.
auth_pwd – Administrator password. Default is null.
Errors
Error Code Description
>=0 success
-1 The path (target of operation) is not valid
-2 The destination (path) is not valid
-3 Overwrite flag is not set and destination exists
-4 The target is resource, but source is collection (in copy move operations)
-5 Permissions are not valid
-6 uid is not valid
-7 gid is not valid
-8 Target is locked
-9 Destination is locked
-10 Property name is reserved (protected or private)
-11 Property does not exists
-12 Authentication failed
-13 Operation is forbidden (the authenticated user do not have a permissions for the action)
-14 the target type is not valid
-15 The umask is not valid
-16 The property already exists
-17 Invalid property value
-18 no such user
-19 no home directory

Examples
Creating a resource and collection

The following example shows collection creation, resource upload and removal. This sequence of commands would leave a resource A.txt in http://[host:port]/DAV/user/A/

SQL> select DB.DBA.DAV_COL_CREATE ('/DAV/user/','110100000R', 'dav','dav','dav','dav');
SQL> select DB.DBA.DAV_COL_CREATE ('/DAV/user/A/','110100000R','dav','dav','dav','dav');
SQL> select DB.DBA.DAV_RES_UPLOAD ('/DAV/user/A/A.txt','this is a test','text/plain','110100000R','dav','dav','dav','dav');
SQL> select DB.DBA.DAV_RES_UPLOAD ('/DAV/user/A/B.txt','this is a second test','text/plain','110100000R','dav','dav','dav','dav');
SQL> select DB.DBA.DAV_DELETE ('/DAV/user/A/B.txt', 0, 'dav', 'dav');
      
See Also

DAV content manipulation functions

DAV lock manipulation functions

DAV search functions

DAV user management functions