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.