new File()
Constructor sets all file properties
new File(array|string|null $props = null, string|null $url = null)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $props | arrayorstringornull |
null
|
Properties or deprecated $root string |
| $url | stringornull |
null
|
Deprecated argument, use $props['url'] instead |
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
When the model does not use the Kirby\Filesystem\IsFile trait |