コード例 #1
0
 /**
  * Returns the publish path and filename to be used to publish the specified persistent resource
  *
  * @param \TYPO3\FLOW3\Resource\Resource $resource The resource to build the publish path and filename for
  * @param boolean $returnFilename FALSE if only the directory without the filename should be returned
  * @return string The publish path and filename
  */
 protected function buildPersistentResourcePublishPathAndFilename(\TYPO3\FLOW3\Resource\Resource $resource, $returnFilename)
 {
     $publishPath = $this->resourcesPublishingPath . 'Persistent/';
     if ($returnFilename === TRUE) {
         return $publishPath . $resource->getResourcePointer()->getHash() . '.' . $resource->getFileExtension();
     }
     return $publishPath;
 }
コード例 #2
0
 /**
  * Returns the private path to the source of the given resource.
  *
  * @param \TYPO3\FLOW3\Resource\Resource $resource
  * @return mixed The full path and filename to the source of the given resource or FALSE if the resource file doesn't exist
  */
 protected function getPersistentResourceSourcePathAndFilename(\TYPO3\FLOW3\Resource\Resource $resource)
 {
     $pathAndFilename = FLOW3_PATH_DATA . 'Persistent/Resources/' . $resource->getResourcePointer()->getHash();
     return file_exists($pathAndFilename) ? $pathAndFilename : FALSE;
 }