Skip to content

Kirby 5.0.4

F::rename()

Changes the name of the file without touching the extension

F::rename(string $file, string $newName, bool $overwrite = false): string|false

Parameters

Name Type Default Description
$filerequired string no default value
$newNamerequired string no default value
$overwrite bool false Force overwrite existing files

Return types

stringorfalse

Parent class

Kirby\Filesystem\F