Skip to content

Kirby 4.4.1

F::extension()

Gets the extension of a file

F::extension(?string $file = null, ?string $extension = null): string

Parameters

Name Type Default Description
$file string|null null The filename or path
$extension string|null null Set an optional extension to overwrite the current one

Return type

string

Parent class

Kirby\Filesystem\F