Nextcloud PHP API (stable18)

IObjectStore

Interface IObjectStore

Tags
since
7.0.0

Table of Contents

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

Methods

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) : mixed
Parameters
$urn : string

the unified resource name used to identify the object

$stream : resource

stream with the data to write

Tags
throws
Exception

when something goes wrong, message will be logged

since
7.0.0
Return values
mixed

Search results