• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/wizard_util.php
  • Класс: ifCWizardUtil
  • Вызов: CWizardUtil::CopyFile
static function CopyFile($fileID, $destPath, $deleteAfterCopy = true)
{
	$arFile = CFile::GetFileArray($fileID);
	if (!$arFile)
		return false;

	$filePath = $_SERVER["DOCUMENT_ROOT"].$arFile["SRC"];
	if (!is_file($filePath))
		return false;

	CheckDirPath($_SERVER["DOCUMENT_ROOT"].$destPath);
	if(!@copy($filePath, $_SERVER["DOCUMENT_ROOT"].$destPath))
		return false;

	if ($deleteAfterCopy)
		CFile::Delete($fileID);

	return true;
}