Skip to content

Kirby 3.8.4

$file->copy()

Copy a file to a new location.

$file->copy(string $target, bool $force = false): Kirby\Filesystem\File

Parameters

Name Type Default
$target * string
$force bool false

Return type

Kirby\Filesystem\File

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

Parent class

Kirby\Filesystem\File