Skip to content

Kirby 4.5.0

$hasfiles->file()

Returns a specific file by filename or the first one

$hasfiles->file(?string $filename = null, string $in = 'files'): Kirby\Cms\File|null

Parameters

Name Type Default
$filename string|null null
$in string 'files'

Return type

Kirby\Cms\File|null

Parent class

Kirby\Cms\HasFiles