Bitrix Site Manager

CFile::UpdateDesc

CDBResult
CFile::UpdateDesc(
 int file_id,
 string description
)

The method UpdateDesc updates the registered file description. Returns an instance of the CDBResult class.

Parameters

ParameterDescription
file_id Numeric ID of the file.
description New file description.

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();
		CFile::UpdateDesc($arElement["PREVIEW_PICTURE"], 
                                    "Element # ".$arElement["ID"]);
	endwhile;
endif;
?>