Skip to content

Kirby 3.5.7.1

$file->replace()

Replaces the file. The source must be an absolute path to a file or a Url.

$file->replace(string $source): Kirby\Cms\File

Parameters

Name Type Default
$source * string

Return type

Kirby\Cms\File

This method does not modify the existing $file object but returns a new object with the changes applied. Learn more →

Exceptions

Parent class

Kirby\Cms\File