/** * Collects the information to be cached in sys_file * * @param string $identifier * @return array */ protected function gatherFileInformationArray($identifier) { $fileInfo = $this->storage->getFileInfoByIdentifier($identifier); $fileInfo = $this->transformFromDriverFileInfoArrayToFileObjectFormat($fileInfo); $fileInfo['type'] = $this->getFileType($fileInfo['mime_type']); $fileInfo['sha1'] = $this->storage->hashFileByIdentifier($identifier, 'sha1'); $fileInfo['extension'] = \TYPO3\CMS\Core\Utility\PathUtility::pathinfo($fileInfo['name'], PATHINFO_EXTENSION); $fileInfo['missing'] = 0; return $fileInfo; }