WebDAV == Description == This page presents the configuration offered by HOP for configuring and customizing the [[http://tools.ietf.org/html/rfc2518|WebDAV]] server support. ~~ Hop supports WebDAV server level 1. That is, the current version of the HOP server does not support the locking mechanisms. On request, HOP's maintainers might be considering adding support for WebDAV level 2. Please, post a message to the HOP mailing list for such a request. ~~ Note: ,( :style { font-weight: bold; color: red } [ Only users that are granted the permission to execute "webdav" services (see ,( "Access Control" "04-authentication.wiki")) are authorized to execute WebDAV requests.]) == Synopsis == === server parameters === (hop-enable-webdav) (hop-enable-webdav-set! arg) === server functions === (webdav->list url [timeout:] [proxy:]) (webdav->path-list url [timeout:] [proxy:]) (webdav-file-exists? url [timeout:] [proxy:]) (webdav-directory? url [timeout:] [proxy:]) (webdav-file-modification-time url [timeout:] [proxy:]) (webdav-file-size url [timeout:] [proxy:]) (webdav-delete-file url [timeout:] [proxy:]) (webdav-delete-directory url [timeout:] [proxy:]) (webdav-make-directory url [timeout:] [proxy:]) (webdav-make-directories url [timeout:] [proxy:]) (webdav-rename-file url name [timeout:] [proxy:]) (webdav-copy-file url name [timeout:] [proxy:]) (webdav-put-file url content [timeout:] [proxy:]) == Introduction == Their are several ways of using a WebDAV server as implemented by HOP. One solution is to use the HOP's ++webdav->list++ function that returns the list of files available on the server. Various others client exists. For instance, on Linux, one might use the [[http://dav.sourceforge.net/|davfs2]] file system driver that allows you to mount a WebDAV server as a local file system, like a disk drive. This way applications can access resources on a Web server without knowing anything about HTTP or WebDAV. ~~ Assuming a HOP server running on the computer ++myhop.org++ listening on port ++8080++, a WebDAV file system can be mounted with: mount -t davfs http://myhop.hop:8080 /mnt/misc == Examples == webdav == Server Definitions == === ++hop-enable-webdav++ === hop-enable-webdav hop-enable-webdav-set! ^ access ^ type ^ short description ^ | r/w | bool | The value ++#t++ enable WebDAV support. | ~~ The parameter ++hop-enable-webdav++ enables or disables Hop WebDAV support. It defaults to ++#f++. === ++webdav->list url [timeout:] [proxy:]++ === webdav->list ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | The function ++webdav->list++ opens a connection to a distance server and (optionally via the ++proxy++ passed as argument) and it emits a ++PROPFIND++ request in order to get the list of files available at ++url++. This files can be individually downloaded with regular HTTP ++GET++ commands. === ++webdav->path-list url [timeout:] [proxy:]++ === webdav->path-list ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | The function ++webdav->path-list++ opens a connection to a distance server and (optionally via the ++proxy++ passed as argument) and it emits a ++PROPFIND++ request in order to get the list of files available at ++url++. Contrary to ++webdav->list++ this function returns absolute file names. === ++webdav-file-exists? url [timeout:] [proxy:]++ === webdav-file-exists? ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Returns ++#t++ if and only if the file refereed to by ++url++ exists on the distant server. Otherwise, returns ++#f++. === ++webdav-directory? url [timeout:] [proxy:]++ === webdav-directory? ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Returns ++#t++ if and only if the file refereed to by ++url++ exists on the distant server and denotes a collection. Otherwise, returns ++#f++. === ++webdav-file-modification-time url [timeout:] [proxy:]++ === webdav-file-modification-time ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Returns the date of the last modification of the file denoted by ++url++. === ++webdav-file-size url [timeout:] [proxy:]++ === webdav-file-size ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Returns the size of the file denoted by ++url++. === ++webdav-delete-file url [timeout:] [proxy:]++ === webdav-delete-file ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Deletes the file denoted by ++url++. === ++webdav-delete-directory url [timeout:] [proxy:]++ === webdav-delete-directory ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Deletes the directory denoted by ++url++. === ++webdav-make-directory url [timeout:] [proxy:]++ === webdav-make-directory ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Creates a new directory denoted by ++url++. === ++webdav-make-directories url [timeout:] [proxy:]++ === webdav-make-directories ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Creates the new directory denoted by ++url++ and all its missing parents. === ++webdav-rename-file url name [timeout:] [proxy:]++ === webdav-rename-file ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | name | bstring | | a file name. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Renames the file denoted by ++url++ as ++name++. === ++webdav-copy-file url name [timeout:] [proxy:]++ === webdav-copy-file ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | name | bstring | | a file name. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Copies the file denoted by ++url++ into ++name++. === ++webdav-put-file url content [timeout:] [proxy:]++ === webdav-put-file ^ arguments ^ type ^ default ^ short description ^ | url | bstring | | the WebDAV URL. | | content | bstring/input-port | | a content. | | timeout | integer | -1 | Optional connection timeout. | | proxy | bstring | #f | Optional proxy. | Creates a new file on the remote server. The content of the file is either given by a string of characters or by an input port.