Skip to content

Kirby 4.5.0

Dir::read()

Reads all files from a directory and returns them as an array.

Dir::read(string $dir, ?array $ignore = null, bool $absolute = false): array

Parameters

Name Type Default Description
$dir * string The path of directory
$ignore array|null null Optional array with filenames, which should be ignored
$absolute bool false If true, the full path for each item will be returned

Return type

array

Parent class

Kirby\Filesystem\Dir