Skip to content

Kirby 4.2.0

FileRules::changeName()

Validates if the filename can be changed

FileRules::changeName(Kirby\Cms\File $file, string $name): bool

Parameters

Name Type Default
$file * Kirby\Cms\File
$name * string

Return type

bool

Exceptions

Type Description
Kirby\Exception\DuplicateException If a file with this name exists
Kirby\Exception\PermissionException If the user is not allowed to rename the file

Parent class

Kirby\Cms\FileRules