\Omega\Filesystem\Contracts ListKeysAwareInterface

Interface that adds native support for listing keys to an adapter.

This interface defines a method for listing keys (file or directory identifiers) in the filesystem that begin with a specified prefix. It ensures that any filesystem adapter implementing this interface can retrieve a list of keys starting with a given string.

Summary

Methods
Constants
listKeys()
No public constants found

Methods

listKeys()

listKeys(string  $prefix = '') : array

Lists keys that begin with the given prefix.

This method retrieves an array of keys (file or directory names) from the filesystem that start with the provided prefix. It does not support wildcard or regex matching, only simple prefix-based filtering.

Parameters

string $prefix

The prefix to filter the keys (optional, defaults to an empty string).

Returns

array —

An array of keys starting with the specified prefix.