Filesystem::copy()

copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false)

Copies a file.

If the target file is older than the origin file, it's always overwritten. If the target file is newer, it is overwritten only when the $overwriteNewerFiles option is set to true.

Parameters

string $originFile The original filename
string $targetFile The target filename
bool $overwriteNewerFiles If true, target files newer than origin files are overwritten

Exceptions

FileNotFoundException When originFile doesn't exist
IOException When copy fails
doc_Symfony
2016-10-28 06:16:38
Comments
Leave a Comment

Please login to continue.