Skip to content

Kirby 5.0.4

F::extension()

Gets the extension of a file

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

Parameters

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

Return type

string

Parent class

Kirby\Filesystem\F