Symfony\Component\Filesystem\Filesystem::copy
Copies a file.
This method only copies the file if the origin file is newer than the target file. By default, if the target already exists, it is not overridden.
Signature
public function copy(string
$originFile,
[string
$targetFile = false,
[boolean
$override = false]] )
Parameters
$originFile
— string- The original filename
$targetFile
— string- The target filename
$override
— boolean- Whether to override an existing file or not
Errors/Exceptions
-
IOException
- When copy fails