ocsApiWebdavManager: ocsApiWebdavManager

ocsApiWebdavManagerR Documentation

ocsApiWebdavManager

Description

ocsApiWebdavManager

ocsApiWebdavManager

Format

R6Class object.

Value

Object of R6Class for modelling an ocsManager for Webdav API

Super classes

ocs4R::ocs4RLogger -> ocs4R::ocsManager -> ocsApiWebdavManager

Methods

Public methods

Inherited methods

Method new()

Initialize manager

Usage
ocsApiWebdavManager$new(url, user, pwd, logger = NULL, keyring_backend = NULL)
Arguments
url

url

user

user

pwd

pwd

logger

logger

keyring_backend

backend to use with keyring. Default is NULL


Method getWebdavRoot()

Get the 'ocs' WebDAV root URL

Usage
ocsApiWebdavManager$getWebdavRoot()

Method listFiles()

WebDAV method to list folders/files given a relative path. The relative path is set to "/" by default, which corresponds to the root of the 'ocs' repository.

Usage
ocsApiWebdavManager$listFiles(relPath = "/")
Arguments
relPath

relative path

Returns

the list of files


Method makeCollection()

WebDAV method to make a collection. By default relPath is set to "/" (root). The name is the name of the new collection to be created. The function is recursive in the sense that a name can be provided as relative path of a collection tree (eg newfolder1/newfolder2/newfolder3), the function will create recursively as many collections are handled in the name.

Usage
ocsApiWebdavManager$makeCollection(name, relPath = "/")
Arguments
name

name

relPath

relative path


Method uploadFile()

WebDAV method to upload a file. By default relPath is set to "/" (root).

Usage
ocsApiWebdavManager$uploadFile(
  filename,
  relPath = "/",
  delete_if_existing = FALSE
)
Arguments
filename

file name

relPath

relative path

delete_if_existing

delete if existing file? Default is FALSE


Method deleteFile()

WebDAV method to delete a file. By default relPath is set to "/" (root).

Usage
ocsApiWebdavManager$deleteFile(filename, relPath = "/")
Arguments
filename

file name

relPath

relative path


Method downloadFile()

Downloads a file

Usage
ocsApiWebdavManager$downloadFile(relPath, filename, outdir = ".")
Arguments
relPath

relative path

filename

file name

outdir

the out directory where to download the file


Method getPublicFile()

Get details of a shared public file given its share token

Usage
ocsApiWebdavManager$getPublicFile(share_token)
Arguments
share_token

the share token


Method clone()

The objects of this class are cloneable with this method.

Usage
ocsApiWebdavManager$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


ocs4R documentation built on April 30, 2026, 1:07 a.m.