IObjectStore

interface OCP\Files\ObjectStore\IObjectStore
Interface IObjectStore
Implemented by:OC\Files\ObjectStore\StorageObjectStore OC\Files\ObjectStore\Azure OC\Files\ObjectStore\S3 OC\Files\ObjectStore\Swift
Source:lib/public/Files/ObjectStore/IObjectStore.php#35

Methods

public OCP\Files\ObjectStore\IObjectStore::getStorageId()
Source:lib/public/Files/ObjectStore/IObjectStore.php#41
Returns:string the container or bucket name where objects are stored
Since:7.0.0
public OCP\Files\ObjectStore\IObjectStore::readObject($urn)
Source:

lib/public/Files/ObjectStore/IObjectStore.php#50

Parameters:
  • $urn (string) the unified resource name used to identify the object
Returns:

resource stream with the read data

Throws:

\Exception when something goes wrong, message will be logged

Throws:

\OCP\Files\NotFoundException if file does not exist

Throws:

\Exception when something goes wrong, message will be logged

Throws:

\OCP\Files\NotFoundException if file does not exist

Since:

7.0.0

public OCP\Files\ObjectStore\IObjectStore::writeObject($urn, $stream, $mimetype=null)
Source:

lib/public/Files/ObjectStore/IObjectStore.php#59

Parameters:
  • $urn (string) the unified resource name used to identify the object
  • $stream (resource) stream with the data to write
  • $mimetype (string | null) the mimetype to set for the remove object @since 22.0.0
Throws:

\Exception when something goes wrong, message will be logged

Since:

7.0.0

public OCP\Files\ObjectStore\IObjectStore::deleteObject($urn)
Source:

lib/public/Files/ObjectStore/IObjectStore.php#67

Parameters:
  • $urn (string) the unified resource name used to identify the object
Returns:

void

Throws:

\Exception when something goes wrong, message will be logged

Since:

7.0.0

public OCP\Files\ObjectStore\IObjectStore::objectExists($urn)
Check if an object exists in the object store
Source:

lib/public/Files/ObjectStore/IObjectStore.php#76

Parameters:
  • $urn (string)
Returns:

bool

Since:

16.0.0

public OCP\Files\ObjectStore\IObjectStore::copyObject($from, $to)
Source:

lib/public/Files/ObjectStore/IObjectStore.php#84

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
Returns:

void

Since:

21.0.0