Documentation

Drive
in package

Class representing a single drive/space in ownCloud Infinite Scale

Table of Contents

Methods

createFolder()  : bool
delete()  : void
Deletes the current drive irreversibly.
deletePermission()  : bool
Permanently delete the current drive share $permissionId will be provided by getPermissionId()
deleteResource()  : bool
Delete (move to trash-bin) the Ocis resource (file or folder) at the given path in the current drive
disable()  : void
Disables the current drive without deleting it.
emptyTrashbin()  : bool
Empty the trash-bin of the current drive. ALL FILES AND FOLDERS IN THE TRASH-BIN WILL BE DELETED! THIS ACTION CANNOT BE REVERTED!
enable()  : void
Enables the current drive.
getAlias()  : string
getFile()  : callable|resource|string
Download and return the content of the file at the given path in the current drive
getFileStream()  : resource
Return a stream resource for the file at the given path in the current drive.
getId()  : string
getLastModifiedDateTime()  : DateTime
getName()  : string
getPermissions()  : array<string|int, Permission>
get all permission assigned on drive
getQuota()  : Quota
getRawData()  : mixed
getResource()  : OcisResource
get a specific resource in the current drive
getResourceMetadataById()  : stdClass
getResources()  : array<string|int, OcisResource>
List the content of a specific path in the current drive
getRoles()  : array<string|int, SharingRole>
Gets all possible roles for the drive ( Project drive )
getRoot()  : DriveItem|null
getType()  : DriveType
getWebDavUrl()  : string
getWebUrl()  : string
invite()  : Permission
Invite a user or group to the drive.
isDisabled()  : bool
moveResource()  : bool
Move or rename an Ocis resource in the current drive
setDescription()  : Drive
setImage()  : Drive
setName()  : Drive
setPermissionExpiration()  : bool
Change the Expiration date for the current drive share Set to null to remove the expiration date
setPermissionRole()  : bool
Change the Role of the particular Drive Share.
setQuota()  : Drive
setReadme()  : Drive
tagResource()  : void
untagResource()  : void
uploadFile()  : bool
Upload the given content to a specific path in the current drive
uploadFileStream()  : bool
Stream the given resource to a specific path in the current drive

Methods

getAlias()

public getAlias() : string
Return values
string

getId()

public getId() : string
Return values
string

getName()

public getName() : string
Return values
string

getRawData()

public getRawData() : mixed

getResource()

get a specific resource in the current drive

public getResource([string $path = "/" ]) : OcisResource
Parameters
$path : string = "/"
Return values
OcisResource

getResourceMetadataById()

public getResourceMetadataById(string $id) : stdClass
Parameters
$id : string
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

Return values
stdClass

getRoot()

public getRoot() : DriveItem|null
Return values
DriveItem|null

getWebDavUrl()

public getWebDavUrl() : string
Return values
string

getWebUrl()

public getWebUrl() : string
Return values
string

invite()

Invite a user or group to the drive.

public invite(User|Group $recipient, SharingRole $role[, DateTimeImmutable|null $expiration = null ]) : Permission
Parameters
$recipient : User|Group
$role : SharingRole
$expiration : DateTimeImmutable|null = null
Tags
throws
BadRequestException
throws
ForbiddenException
throws
HttpException
throws
InvalidResponseException
throws
NotFoundException
throws
UnauthorizedException
throws
InternalServerErrorException
throws
EndPointNotImplementedException
Return values
Permission

setDescription()

public setDescription(string $description) : Drive
Parameters
$description : string
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

Return values
Drive

setImage()

public setImage(object $image) : Drive
Parameters
$image : object
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

The type of $image is likely to be \GdImage when implemented. That would require the php-gd extension to be installed.

Return values
Drive

setName()

public setName(string $name) : Drive
Parameters
$name : string
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

Return values
Drive

setPermissionExpiration()

Change the Expiration date for the current drive share Set to null to remove the expiration date

public setPermissionExpiration(string $permissionId, DateTimeImmutable|null $expiration) : bool
Parameters
$permissionId : string
$expiration : DateTimeImmutable|null
Tags
throws
UnauthorizedException
throws
ForbiddenException
throws
InvalidResponseException
throws
BadRequestException
throws
HttpException
throws
NotFoundException
throws
InternalServerErrorException
Return values
bool

setPermissionRole()

Change the Role of the particular Drive Share.

public setPermissionRole(string $permissionId, SharingRole $role) : bool

Possible roles are defined by the drive and have to be queried using Drive::getRoles() Roles for shares are not to be confused with the types of share links!

Parameters
$permissionId : string
$role : SharingRole
Tags
see
Drive::getRoles()
throws
UnauthorizedException
throws
ForbiddenException
throws
InvalidResponseException
throws
BadRequestException
throws
HttpException
throws
NotFoundException
throws
InternalServerErrorException
Return values
bool

setQuota()

public setQuota(int $quota) : Drive
Parameters
$quota : int
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

Return values
Drive

setReadme()

public setReadme(string $readme) : Drive
Parameters
$readme : string
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

Return values
Drive

tagResource()

public tagResource(string $path, array<string|int, string> $tags) : void
Parameters
$path : string
$tags : array<string|int, string>
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!

untagResource()

public untagResource(string $path, array<string|int, string> $tags) : void
Parameters
$path : string
$tags : array<string|int, string>
Tags
todo

This function is not implemented yet! Place, name and signature of the function might change!


        
On this page

Search results