protected function restoreFile($filePath, $backupPath, $clean = true)
    {
        if (file_exists($backupPath)) {
            copy($backupPath, $filePath);

            if ($clean) {
                unlink($backupPath);
            }
        }

        return $backupPath;
    }
protected function restoreFile($filePath, $backupPath, $clean = true)
    {
        if (file_exists($backupPath)) {
            copy($backupPath, $filePath);

            if ($clean) {
                unlink($backupPath);
            }
        }

        return $backupPath;
    }
protected function restoreFile ( $ filePath , $ backupPath , $ clean = true ) { if ( file_exists ( $ backupPath ) ) { copy ( $ backupPath , $ filePath ) ; if ( $ clean ) { unlink ( $ backupPath ) ; } } return $ backupPath ; }
Restores a file from its backup copy.

@param string $filePath the file path.
@param string $backupPath the backup path.
@param boolean $clean if 'true' deletes the backup copy.
@return string the created backup file path.
Restores a file from its backup copy .