Reference

Guide

F::rename()

Changes the name of the file without touching the extension

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

Parameters

Name Type Default Description
$file string
$newName string
$overwrite bool false

Force overwrite existing files

Return type

string|bool

Source code

kirby/src/Toolkit/F.php#L528