Skip to content

Kirby 4.5.0

$fileactions->changeName()

Renames the file (optionally also the extension).

$fileactions->changeName(string $name, bool $sanitize = true, ?string $extension = null): Kirby\Cms\FileActions

Parameters

Name Type Default
$name * string
$sanitize bool true
$extension string|null null

Return type

Kirby\Cms\FileActions

This method does not modify the existing $fileactions object but returns a new object with the changes applied. Learn more →

Exceptions

Parent class

Kirby\Cms\FileActions