Nextcloud PHP API (master)

IObjectStoreMetaData

Interface IObjectStoreMetaData

Tags
psalm-type

ObjectMetaData = array{mtime?: \DateTime, etag?: string, size?: int, mimetype?: string, filename?: string, original-path?: string, original-storage?: string}

since
32.0.0

Table of Contents

Methods

getObjectMetaData()  : ObjectMetaData
Get metadata for an object.
listObjects()  : Iterator<string|int, ObjectMetaData}>
List all objects in the object store.
writeObjectWithMetaData()  : void

Methods

getObjectMetaData()

Get metadata for an object.

public getObjectMetaData(string $urn) : ObjectMetaData
Parameters
$urn : string
Tags
since
32.0.0
Return values
ObjectMetaData

listObjects()

List all objects in the object store.

public listObjects([string $prefix = '' ]) : Iterator<string|int, ObjectMetaData}>

If the object store implementation can do it efficiently, the metadata for each object is also included.

Parameters
$prefix : string = ''
Tags
since
32.0.0
Return values
Iterator<string|int, ObjectMetaData}>

writeObjectWithMetaData()

public writeObjectWithMetaData(string $urn, resource $stream, ObjectMetaData $metaData) : void
Parameters
$urn : string

the unified resource name used to identify the object

$stream : resource

stream with the data to write

$metaData : ObjectMetaData

the metadata to set for the object

Tags
throws
Exception

when something goes wrong, message will be logged

since
32.0.0

        
On this page

Search results