Learn R Programming

Simple WebDAV client

Provides some functions to

  • download a file or a folder (recursively) from a WebDAV server
  • upload a file or a folder (recursively) to a WebDAV server
  • copy, move, delete files or folders on a WebDAV server
  • list directories on the WebDAV server

Notice: when uploading or downloading files, they are overwritten without any warnings.

Installation

To install the stable version from CRAN please use

install.packages('rdav')

You can install the most recent development version from r-universe.dev

install.packages('rdav', 
     repos = c('https://gk-crop.r-universe.dev', 'https://cloud.r-project.org'))

Usage

You have to supply the URL to the WebDAV server and your username. Once you call wd_connect, you will be prompted for the password.

library(rdav)
r <- wd_connect("https://example.com/remote.php/dav/files/user", "user")

wd_dir(r) # lists the main directory
wd_dir(r, "subdir", as_df = TRUE) # lists 'subdir', returns a dataframe

Create folder, upload and download data

wd_mkdir(r,"myfolder")
wd_upload(r, "testfile.R", "myfolder/testfile.R")
wd_download(r, "myfolder", "d:/data/fromserver")

Share files via public link or e-mail

ocs_create_share_link(r, "myfolder")
ocs_create_share_mail(r, "myfolder", "mail@example.com")

Copy Link

Version

Install

install.packages('rdav')

Monthly Downloads

152

Version

0.3.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Gunther Krauss

Last Published

December 3rd, 2025

Functions in rdav (0.3.0)

wd_move

Moves a file or directory on the server
ocs_shares_extended

Returns information for shares
rdav

rdav: Interchange Files With 'WebDAV' Servers
wd_getwd

Get the current WebDAV working directory
wd_download

Fetches a file or directory (recursively) from the WebDAV server
wd_connect

Establishes a connection to a WebDAV server
wd_copy

Copies a file or directory on the WebDAV server
wd_delete

Deletes a file or directory (collection) on WebDAV server
wd_dir

Lists the content of a WebDAV directory
ncl_baseurl

Builds the Nextcloud base URL for a nextcloud server from host and user names
ncl_shareurl

Builds the Nextcloud base URL for a public share from host and user names
ocs_create_share

Creates a share
ocs_delete_share

Deletes a share
ncl_username_from_url

Extracts the user name from a Nextcloud Base URL
ocs_modify_share

Modifies properties of a share
ocs_find_users

Search for users one could share data
ncl_shareurl_from_publicurl

Creates the Nextcloud base URL for a share from a public share url
ocs_send_mail

Notifies the user of a mail share
ocs_share_info

Get infor for a specific share
wd_mkdir

Creates a directory (collection) on WebDAV server
wd_isdir

Checks if the resource on WebDAV is a directory
wd_upload

Uploads a file or directory to WebDAV
wd_setwd

Set working directory