Reference

Guide

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

Source code

kirby/src/Toolkit/Dir.php#L297