FileRules::changeName()
Validates if the filename can be changed
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 |