ocsApiWebdavManager
ocsApiWebdavManager
Object of R6Class for modelling an ocsManager for Webdav API
R6Class object.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
ocs4R::ocs4RLogger -> ocs4R::ocsManager -> ocsApiWebdavManager
Inherited methods
ocs4R::ocs4RLogger$ERROR()ocs4R::ocs4RLogger$INFO()ocs4R::ocs4RLogger$WARN()ocs4R::ocs4RLogger$getClass()ocs4R::ocs4RLogger$getClassName()ocs4R::ocs4RLogger$logger()ocs4R::ocsManager$connect()ocs4R::ocsManager$getAPISharingManager()ocs4R::ocsManager$getAPIUserProvisioningManager()ocs4R::ocsManager$getAPIWebdavManager()ocs4R::ocsManager$getCapabilities()ocs4R::ocsManager$getVersion()
new()Initialize manager
ocsApiWebdavManager$new(url, user, pwd, logger = NULL, keyring_backend = NULL)urlurl
useruser
pwdpwd
loggerlogger
keyring_backendbackend to use with keyring. Default is NULL
getWebdavRoot()Get the 'ocs' WebDAV root URL
ocsApiWebdavManager$getWebdavRoot()
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.
ocsApiWebdavManager$listFiles(relPath = "/")relPathrelative path
the list of files
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.
ocsApiWebdavManager$makeCollection(name, relPath = "/")namename
relPathrelative path
uploadFile()WebDAV method to upload a file. By default relPath is set to "/" (root).
ocsApiWebdavManager$uploadFile(
filename,
relPath = "/",
delete_if_existing = FALSE
)filenamefile name
relPathrelative path
delete_if_existingdelete if existing file? Default is FALSE
deleteFile()WebDAV method to delete a file. By default relPath is set to "/" (root).
ocsApiWebdavManager$deleteFile(filename, relPath = "/")filenamefile name
relPathrelative path
downloadFile()Downloads a file
ocsApiWebdavManager$downloadFile(relPath, filename, outdir = ".")relPathrelative path
filenamefile name
outdirthe out directory where to download the file
getPublicFile()Get details of a shared public file given its share token
ocsApiWebdavManager$getPublicFile(share_token)share_tokenthe share token
clone()The objects of this class are cloneable with this method.
ocsApiWebdavManager$clone(deep = FALSE)deepWhether to make a deep clone.