/**
  * Getter function to return the folder where the files can
  * be processed. Does not check for access rights here.
  *
  * @return Folder
  */
 public function getProcessingFolder()
 {
     if (!isset($this->processingFolder)) {
         $processingFolder = self::DEFAULT_ProcessingFolder;
         if (!empty($this->storageRecord['processingfolder'])) {
             $processingFolder = $this->storageRecord['processingfolder'];
         }
         try {
             if (strpos($processingFolder, ':') !== FALSE) {
                 $this->processingFolder = ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($processingFolder);
             } else {
                 if ($this->driver->folderExists($processingFolder) === FALSE) {
                     $this->processingFolder = $this->createFolder($processingFolder);
                 } else {
                     $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
                     $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
                 }
             }
         } catch (Exception\InsufficientFolderWritePermissionsException $e) {
             $this->processingFolder = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\InaccessibleFolder', $this, $processingFolder, $processingFolder);
         } catch (Exception\ResourcePermissionsUnavailableException $e) {
             $this->processingFolder = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\InaccessibleFolder', $this, $processingFolder, $processingFolder);
         }
     }
     return $this->processingFolder;
 }
Exemplo n.º 2
0
 /**
  * Getter function to return the folder where the files can
  * be processed. Does not check for access rights here.
  *
  * @return Folder
  */
 public function getProcessingFolder()
 {
     if (!isset($this->processingFolder)) {
         $processingFolder = self::DEFAULT_ProcessingFolder;
         if (!empty($this->storageRecord['processingfolder'])) {
             $processingFolder = $this->storageRecord['processingfolder'];
         }
         try {
             if (strpos($processingFolder, ':') !== false) {
                 list($storageUid, $processingFolderIdentifier) = explode(':', $processingFolder, 2);
                 $storage = ResourceFactory::getInstance()->getStorageObject($storageUid);
                 if ($storage->hasFolder($processingFolderIdentifier)) {
                     $this->processingFolder = $storage->getFolder($processingFolderIdentifier);
                 } else {
                     $this->processingFolder = $storage->createFolder(ltrim($processingFolderIdentifier, '/'));
                 }
             } else {
                 if ($this->driver->folderExists($processingFolder) === false) {
                     $this->processingFolder = $this->createFolder($processingFolder);
                 } else {
                     $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
                     $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
                 }
             }
         } catch (Exception\InsufficientFolderWritePermissionsException $e) {
             $this->processingFolder = GeneralUtility::makeInstance(InaccessibleFolder::class, $this, $processingFolder, $processingFolder);
         } catch (Exception\ResourcePermissionsUnavailableException $e) {
             $this->processingFolder = GeneralUtility::makeInstance(InaccessibleFolder::class, $this, $processingFolder, $processingFolder);
         }
     }
     return $this->processingFolder;
 }
Exemplo n.º 3
0
 /**
  * Getter function to return the folder where the files can
  * be processed. Does not check for access rights here.
  *
  * @return Folder
  */
 public function getProcessingFolder()
 {
     if (!isset($this->processingFolder)) {
         $processingFolder = self::DEFAULT_ProcessingFolder;
         if (!empty($this->storageRecord['processingfolder'])) {
             $processingFolder = $this->storageRecord['processingfolder'];
         }
         if ($this->driver->folderExists($processingFolder) === FALSE) {
             $this->processingFolder = $this->createFolder($processingFolder);
         } else {
             $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
             $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
         }
     }
     return $this->processingFolder;
 }