$api->file()
Returns the file object for the given parent path and filename
$api->file(string $path, string $filename): Kirby\Cms\File|null
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $pathrequired | string |
no default value | Path to file's parent model |
| $filenamerequired | string |
no default value |
Return types
Kirby\Cms\Fileornull
This method modifies the existing $api object it is applied to and returns it again.
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\NotFoundException |
if the file cannot be found |