int
CFile::CopyFile(
int file_id
)
The method CopyFile copies the registered file and returns the ID of a copy.
Parameters
Parameter | Description |
file_id |
Numeric ID of the file to be copied. |
See Also
Example
<?
if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE,
$IBLOCK_ID,
false,
array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER,
"ID" => "ASC"),
false, $arrFilter)):
$rsElements->NavStart($PAGE_ELEMENT_COUNT);
while ($obElement = $rsElements->GetNextElement()):
$arElement = $obElement->GetFields();
$arrNewImages[$arElement["ID"]][] =
CFile::CopyFile($arElement["PREVIEW_PICTURE"]);
endwhile;
endif;
?>