Nextcloud PHP API (master)

IObjectStore

Interface IObjectStore

Tags
since
7.0.0

Table of Contents

Methods

copyObject()  : void
deleteObject()  : void
getStorageId()  : string
objectExists()  : bool
Check if an object exists in the object store
readObject()  : resource
writeObject()  : mixed

Methods

copyObject()

public copyObject(string $from, string $to) : void
Parameters
$from : string

the unified resource name used to identify the source object

$to : string

the unified resource name used to identify the target object

Tags
since
21.0.0

deleteObject()

public deleteObject(string $urn) : void
Parameters
$urn : string

the unified resource name used to identify the object

Tags
throws
Exception

when something goes wrong, message will be logged

since
7.0.0

getStorageId()

public getStorageId() : string
Tags
since
7.0.0
Return values
string

the container or bucket name where objects are stored

objectExists()

Check if an object exists in the object store

public objectExists(string $urn) : bool
Parameters
$urn : string
Tags
since
16.0.0
Return values
bool

readObject()

public readObject(string $urn) : resource
Parameters
$urn : string

the unified resource name used to identify the object

Tags
throws
Exception

when something goes wrong, message will be logged

throws
NotFoundException

if file does not exist

since
7.0.0
Return values
resource

stream with the read data

writeObject()

public writeObject(string $urn, resource $stream[, string|null $mimetype = null ]) : mixed
Parameters
$urn : string

the unified resource name used to identify the object

$stream : resource

stream with the data to write

$mimetype : string|null = null

the mimetype to set for the remove object @since 22.0.0

Tags
throws
Exception

when something goes wrong, message will be logged

since
7.0.0

        
On this page

Search results