Skip to content

Kirby 3.5.7.1

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 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\Cms\Dir inherited from Kirby\Toolkit\Dir