\Omega\Filesystem\Contracts MetadataSupporterInterface

Interface that adds support for file metadata management.

This interface defines methods for setting and retrieving metadata associated with a specific file (or key) in the filesystem. Any adapter implementing this interface should provide mechanisms to store and fetch metadata for files.

Summary

Methods
Constants
setMetadata()
getMetadata()
No public constants found

Methods

setMetadata()

setMetadata(string  $key, array  $content) : void

Sets metadata for the specified file (or key).

This method allows setting an array of metadata information for a specific file in the filesystem. The metadata could include custom information like timestamps, file ownership, or any other descriptive data.

Parameters

string $key

The file key for which the metadata is being set.

array $content

An associative array containing the metadata to set.

Returns

void —

getMetadata()

getMetadata(string  $key) : array

Retrieves metadata for the specified file (or key).

This method fetches the metadata associated with the given file key from the filesystem. It returns an associative array of metadata, which may include information such as size, last modification time, and more.

Parameters

string $key

The file key for which metadata is being retrieved.

Returns

array —

An associative array containing the metadata of the file.