/** * Returns a (local copy of) a file for processing it. When changing the * file, you have to take care of replacing the current version yourself! * * @param \TYPO3\CMS\Core\Resource\FileInterface $file * @param bool $writable Set this to FALSE if you only need the file for read operations. This might speed up things, e.g. by using a cached local version. Never modify the file if you have set this flag! * @return string The path to the file on the local disk */ public function getFileForLocalProcessing(\TYPO3\CMS\Core\Resource\FileInterface $file, $writable = true) { error_log('FAL DRIVER: ' . __FUNCTION__); if (!$file->isIndexed() || !$file->getProperty('yagItem') instanceof \Tx_Yag_Domain_Model_Item) { $identifier = $file->getIdentifier(); $fileInfo = $this->getFileInfoByIdentifier($identifier); $sourceUri = $this->yagFileSystemDiv->makePathAbsolute($fileInfo['sourceUri']); } else { $item = $file->getProperty('yagItem'); $sourceUri = $this->yagFileSystemDiv->makePathAbsolute($item->getSourceuri()); } return $sourceUri; }
/** * @return bool */ public function getIsMetadataEditable() { return $this->resource->isIndexed() && $this->getIsWritable() && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata'); }