Skip to content

Kirby 5.0.4

$file->mediaRoot()

Returns the absolute path to the file in the public media folder

$file->mediaRoot(string|null $filename = null): string

Parameters

Name Type Default Description
$filename stringornull null Optional override for the filename

Return type

string

This method modifies the existing $file object it is applied to and returns it again.

Parent class

Kirby\Cms\File