copy
copy($path,$new_folder_place,$flag_fail_exist="true",$timeout=60); - this function is used to create a copy of the specified folder
The function accepts parameters as input:
$path – path to the folder to create a copy of (string). It can be either absolute or relative (relative to the script folder).
$new_folder_place – path where the copy will be made (string). It can be either absolute or relative (relative to the script folder).
$fail_if_exist – if is true do not make a copy if the folder already exists in the path specified for the copy. If false - matching files will be replaced in the existing folder
$timeout – the maximum time to perform this operation (in seconds), by default - 60 seconds. if the operation is not completed during this time, the script continues to run.
After testing, the function returns the result of its work to the script :
true – successfully created a folder (boolean)false – operation failed (boolean)