* @return string
*/
public function getResourceHeader(\TYPO3\CMS\Core\Resource\ResourceInterface $resource, $tWrap = array('', ''), $enableClickMenu = TRUE) {
- $path = $resource->getStorage()->getName() . $resource->getParentFolder()->getIdentifier();
- $iconImgTag = IconUtility::getSpriteIconForResource($resource, array('title' => htmlspecialchars($path)));
+ try {
+ $path = $resource->getStorage()->getName() . $resource->getParentFolder()->getIdentifier();
+ $iconImgTag = IconUtility::getSpriteIconForResource($resource, array('title' => htmlspecialchars($path)));
+ } catch (\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException $e) {
+ $iconImgTag = '';
+ }
if ($enableClickMenu && ($resource instanceof \TYPO3\CMS\Core\Resource\File)) {
$metaData = $resource->_getMetaData();
$isMissing = $file->isMissing();
}
+ if ($this->driver->fileExists($file->getIdentifier()) === FALSE) {
+ $file->setMissing(TRUE);
+ $isMissing = TRUE;
+ }
+
// Check 4: Check the capabilities of the storage (and the driver)
if ($isWriteCheck && ($isMissing || !$this->isWritable())) {
return FALSE;
}
+
// Check 5: "File permissions" of the driver (only when file isn't marked as missing)
if (!$isMissing) {
$filePermissions = $this->driver->getPermissions($file->getIdentifier());
* @throws Exception\InsufficientFolderAccessPermissionsException
*/
public function getFolder($identifier, $returnInaccessibleFolderObject = FALSE) {
+
$data = $this->driver->getFolderInfoByIdentifier($identifier);
$folder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);