• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/documenthandler.php
  • Класс: BitrixDiskDocumentDocumentHandler
  • Вызов: DocumentHandler::getDataForViewFile
public function getDataForViewFile(FileData $fileData);

/**
 * Tells if file in cloud service was changed. For example, the method compares created date and modified date.
 *
 * @param array $currentMetadata Metadata (@see BitrixDiskDocument::getFileMetadata());
 * @param array $oldMetadata Old metadata.
 * @return bool
 */
public function wasChangedAfterCreation(array $currentMetadata, array $oldMetadata = array())
{
	if(isset($currentMetadata['etag'], $oldMetadata['etag']))
	{
		return $currentMetadata['etag'] !== $oldMetadata['etag'];
	}

	$this->errorCollection[] = new Error('Could not get etag', self::ERROR_CODE_NOT_FOUND_ETAG);

	return false;
}