ocsApiSharingManager
ocsApiSharingManager
Object of R6Class for modelling an ocsManager for the Sharing API
R6Class object.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
ocs4R::ocs4RLogger -> ocs4R::ocsManager -> ocsApiSharingManager
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
ocsApiSharingManager$new(url, user, pwd, logger = NULL, keyring_backend = NULL)urlurl
useruser
pwdpwd
loggerlogger
keyring_backendbackend to use with keyring. Default is NULL
getShares()Get list of shares as list. To return as data.frame,
set pretty = TRUE. The method accepts additional parameters.
ocsApiSharingManager$getShares(
path = NULL,
reshares = FALSE,
shared_with_me = NULL,
state = NULL,
subfiles = FALSE,
pretty = FALSE
)pathpath
resharesreshares
shared_with_melist only those shared with me?
statestate
subfilessubfiles
prettypretty
the list of shares as list or data.frame
createShare()Creates a share for the path (file or folder), given a name. The shareType should be among
values 'user','group','publiclink' or 'federated'.The shareWith is required for shareType
'user' and 'group' and corresponds to the username or groupname. The permissions can be set among
values 'read', 'update', 'create', 'delete', 'read-write', 'share', 'all'. By default the permissions will
be the default permissions set by the ocs server (by default 'all').
ocsApiSharingManager$createShare(
path,
name,
shareType,
shareWith,
publicUpload = NULL,
password = NULL,
permissions = NULL,
expireDate = NULL
)pathpath
namename
shareTypethe type of share
shareWitha list of users to share with
publicUploadpublic upload
passwordto set to access the share
permissionspermissions
expireDateexpire date
shareWithUser()Shares a resource (file or folder) with a user given its username handled with argument username.
The permissions can be set among values 'read', 'update', 'create', 'delete', 'read-write', 'share',
'all'. By default the permissions will be the default permissions set by the ocs server (by default 'all').
Returns
ocsApiSharingManager$shareWithUser(
path,
name,
username,
permissions = NULL,
pretty = FALSE
)pathpath
namename
usernameusername
permissionspermissions
prettypretty
groupgroup
the share properties as list (or asdata.frame if pretty is set to TRUE).
shareWithGroup()Shares a resource (file or folder) with a group given its name handled with argument group.
The permissions can be set among values 'read', 'update', 'create', 'delete', 'read-write', 'share',
'all'. By default the permissions will be the default permissions set by the ocs server (by default 'all').
ocsApiSharingManager$shareWithGroup(
path,
name,
group,
permissions = NULL,
pretty = FALSE
)pathpath
namename
groupgroup
permissionspermissions
prettypretty
the share properties as list (or asdata.frame if pretty is set to TRUE).
shareAsPublicLink()Shares a resource (file or folder) as public link. The function returns the public link generated by ocs.
ocsApiSharingManager$shareAsPublicLink(
path,
name = NULL,
publicUpload = FALSE,
password = NULL,
permissions = NULL,
expireDate = NULL
)pathpath
namename
publicUploadpublic upload?
passwordpassword
permissionspermissions
expireDateexpire date
returnthe public sharing link
clone()The objects of this class are cloneable with this method.
ocsApiSharingManager$clone(deep = FALSE)deepWhether to make a deep clone.