FileRules::changeName()
Validates if the filename can be changed
FileRules::changeName(Kirby\Cms\File $file, string $name): void
Parameters
Name | Type | Default |
---|---|---|
$filerequired | Kirby\Cms\File |
no default value |
$namerequired | string |
no default value |
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 |