ocsApiSharingManager: ocsApiSharingManager

ocsApiSharingManagerR Documentation

ocsApiSharingManager

Description

ocsApiSharingManager

ocsApiSharingManager

Format

R6Class object.

Value

Object of R6Class for modelling an ocsManager for the Sharing API

Super classes

ocs4R::ocs4RLogger -> ocs4R::ocsManager -> ocsApiSharingManager

Methods

Public methods

Inherited methods

Method new()

Initialize manager

Usage
ocsApiSharingManager$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 getShares()

Get list of shares as list. To return as data.frame, set pretty = TRUE. The method accepts additional parameters.

Usage
ocsApiSharingManager$getShares(
  path = NULL,
  reshares = FALSE,
  shared_with_me = NULL,
  state = NULL,
  subfiles = FALSE,
  pretty = FALSE
)
Arguments
path

path

reshares

reshares

shared_with_me

list only those shared with me?

state

state

subfiles

subfiles

pretty

pretty

Returns

the list of shares as list or data.frame


Method 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').

Usage
ocsApiSharingManager$createShare(
  path,
  name,
  shareType,
  shareWith,
  publicUpload = NULL,
  password = NULL,
  permissions = NULL,
  expireDate = NULL
)
Arguments
path

path

name

name

shareType

the type of share

shareWith

a list of users to share with

publicUpload

public upload

password

to set to access the share

permissions

permissions

expireDate

expire date


Method 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

Usage
ocsApiSharingManager$shareWithUser(
  path,
  name,
  username,
  permissions = NULL,
  pretty = FALSE
)
Arguments
path

path

name

name

username

username

permissions

permissions

pretty

pretty

group

group

Returns

the share properties as list (or asdata.frame if pretty is set to TRUE).


Method 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').

Usage
ocsApiSharingManager$shareWithGroup(
  path,
  name,
  group,
  permissions = NULL,
  pretty = FALSE
)
Arguments
path

path

name

name

group

group

permissions

permissions

pretty

pretty

Returns

the share properties as list (or asdata.frame if pretty is set to TRUE).


Method shareAsPublicLink()

Shares a resource (file or folder) as public link. The function returns the public link generated by ocs.

Usage
ocsApiSharingManager$shareAsPublicLink(
  path,
  name = NULL,
  publicUpload = FALSE,
  password = NULL,
  permissions = NULL,
  expireDate = NULL
)
Arguments
path

path

name

name

publicUpload

public upload?

password

password

permissions

permissions

expireDate

expire date

return

the public sharing link


Method clone()

The objects of this class are cloneable with this method.

Usage
ocsApiSharingManager$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.