getAbsolutePath() public method

Get absolute file path
Requires '\Webiny\Component\Storage\Driver\AbsolutePathInterface' to be implemented by a Driver class
public getAbsolutePath ( $key = '' ) : mixed
$key
return mixed
Esempio n. 1
0
 /**
  * Get absolute file path.
  * If storage driver does not support absolute paths (cloud storage) returns file key
  *
  * @return string
  */
 public function getAbsolutePath()
 {
     if ($this->storage->supportsAbsolutePaths()) {
         return $this->storage->getAbsolutePath($this->key);
     }
     return $this->getKey();
 }