FileRules::create()
Validates if the file can be created
Parameters
Name | Type | Default |
---|---|---|
$file * | Kirby\Cms\File |
– |
$upload * | Kirby\Image\Image |
– |
Return type
bool
Exceptions
Type | Description |
---|---|
Kirby\Exception\DuplicateException |
If a file with the same name exists |
Kirby\Exception\PermissionException |
If the user is not allowed to create the file |