Methods

setId()

setId(string  $id) : \OCP\Share\IShare

Set the internal id of the share It is only allowed to set the internal id of a share once.

Attempts to override the internal id will result in an IllegalIDChangeException

Parameters

string $id

Throws

\OCP\Share\Exceptions\IllegalIDChangeException
\InvalidArgumentException

Returns

\OCP\Share\IShare

getId()

getId() : string

Get the internal id of the share.

Returns

string

getFullId()

getFullId() : string

Get the full share id. This is the <providerid>:<internalid>.

The full id is unique in the system.

Throws

\UnexpectedValueException

If the fullId could not be constructed

Returns

string

setProviderId()

setProviderId(string  $id) : \OCP\Share\IShare

Set the provider id of the share It is only allowed to set the provider id of a share once.

Attempts to override the provider id will result in an IllegalIDChangeException

Parameters

string $id

Throws

\OCP\Share\Exceptions\IllegalIDChangeException
\InvalidArgumentException

Returns

\OCP\Share\IShare

setNode()

setNode(\OCP\Files\Node  $node) : \OCP\Share\IShare

Set the node of the file/folder that is shared

Parameters

\OCP\Files\Node $node

Returns

\OCP\Share\IShare

The modified object

getNode()

getNode() : \OCP\Files\File|\OCP\Files\Folder

Get the node of the file/folder that is shared

Throws

\OCP\Files\NotFoundException

Returns

\OCP\Files\File|\OCP\Files\Folder

setNodeId()

setNodeId(integer  $fileId) : \OCP\Share\IShare

Set file id for lazy evaluation of the node

Parameters

integer $fileId

Returns

\OCP\Share\IShare

The modified object

getNodeId()

getNodeId() : integer

Get the fileid of the node of this share

Throws

\OCP\Files\NotFoundException

Returns

integer

setNodeType()

setNodeType(string  $type) : \OCP\Share\IShare

Set the type of node (file/folder)

Parameters

string $type

Returns

\OCP\Share\IShare

The modified object

getNodeType()

getNodeType() : string

Get the type of node (file/folder)

Throws

\OCP\Files\NotFoundException

Returns

string

setShareType()

setShareType(integer  $shareType) : \OCP\Share\IShare

Set the shareType

Parameters

integer $shareType

Returns

\OCP\Share\IShare

The modified object

getShareType()

getShareType() : integer

Get the shareType

Returns

integer

setSharedWith()

setSharedWith(string  $sharedWith) : \OCP\Share\IShare

Set the receiver of this share.

Parameters

string $sharedWith

Returns

\OCP\Share\IShare

The modified object

getSharedWith()

getSharedWith() : string

Get the receiver of this share.

Returns

string

setPermissions()

setPermissions(integer  $permissions) : \OCP\Share\IShare

Set the permissions.

See \OCP\Constants::PERMISSION_*

Parameters

integer $permissions

Returns

\OCP\Share\IShare

The modified object

getPermissions()

getPermissions() : integer

Get the share permissions See \OCP\Constants::PERMISSION_*

Returns

integer

setExpirationDate()

setExpirationDate(\DateTime  $expireDate) : \OCP\Share\IShare

Set the expiration date

Parameters

\DateTime $expireDate

Returns

\OCP\Share\IShare

The modified object

getExpirationDate()

getExpirationDate() : \DateTime

Get the expiration date

Returns

\DateTime

setSharedBy()

setSharedBy(string  $sharedBy) : \OCP\Share\IShare

Set the sharer of the path.

Parameters

string $sharedBy

Returns

\OCP\Share\IShare

The modified object

getSharedBy()

getSharedBy() : string

Get share sharer

Returns

string

setShareOwner()

setShareOwner(string  $shareOwner) : \OCP\Share\IShare

Set the original share owner (who owns the path that is shared)

Parameters

string $shareOwner

Returns

\OCP\Share\IShare

The modified object

getShareOwner()

getShareOwner() : string

Get the original share owner (who owns the path that is shared)

Returns

string

setPassword()

setPassword(string  $password) : \OCP\Share\IShare

Set the password for this share.

When the share is passed to the share manager to be created or updated the password will be hashed.

Parameters

string $password

Returns

\OCP\Share\IShare

The modified object

getPassword()

getPassword() : string

Get the password of this share.

If this share is obtained via a shareprovider the password is hashed.

Returns

string

setToken()

setToken(string  $token) : \OCP\Share\IShare

Set the public link token.

Parameters

string $token

Returns

\OCP\Share\IShare

The modified object

getToken()

getToken() : string

Get the public link token.

Returns

string

setTarget()

setTarget(string  $target) : \OCP\Share\IShare

Set the target path of this share relative to the recipients user folder.

Parameters

string $target

Returns

\OCP\Share\IShare

The modified object

getTarget()

getTarget() : string

Get the target path of this share relative to the recipients user folder.

Returns

string

setShareTime()

setShareTime(\DateTime  $shareTime) : \OCP\Share\IShare

Set the time this share was created

Parameters

\DateTime $shareTime

Returns

\OCP\Share\IShare

The modified object

getShareTime()

getShareTime() : \DateTime

Get the timestamp this share was created

Returns

\DateTime

setMailSend()

setMailSend(boolean  $mailSend) : \OCP\Share\IShare

Set if the recipient is informed by mail about the share.

Parameters

boolean $mailSend

Returns

\OCP\Share\IShare

The modified object

getMailSend()

getMailSend() : boolean

Get if the recipient informed by mail about the share.

Returns

boolean

setName()

setName(string  $name) 

Set a user-defined name for this share

Parameters

string $name

getName()

getName() : string

Get user-defined name for this share

Returns

string —

$name