Skip to content

Kirby 5.0.4

$file->niceSize()

Returns the file size in a human-readable format

$file->niceSize(string|false|null $locale = null): string

Parameters

Name Type Default Description
$locale stringorfalseornull null Locale for number formatting,
null for the current locale,
false to disable number formatting

Return type

string

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

Parent class

Kirby\Filesystem\File