• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/composite/data/filestorage.php
  • Класс: BitrixMainCompositeDataFileStorage
  • Вызов: FileStorage::delete
public function delete()
{
	$fileSize = false;
	if ($this->cacheFile && $this->cacheFile->isExists())
	{
		try
		{
			$cacheDirectory = $this->cacheFile->getDirectory();
			$fileSize = $this->cacheFile->getSize();
			$this->cacheFile->delete();

			//Try to cleanup directory
			$children = $cacheDirectory->getChildren();
			if (empty($children))
			{
				$cacheDirectory->delete();
			}
		}
		catch (Exception $exception)
		{

		}
	}

	return $fileSize;
}