Get absolute file path<br />
Requires 'Webiny\Component\Storage\Driver\AbsolutePathInterface' to be implemented by a Driver class

@param $key

@throws StorageException
@return mixed
327502
public function getAbsolutePath($key = '')
    {
        if ($this->supportsAbsolutePaths()) {
            return $this->driver->getAbsolutePath($key);
        }
        throw new StorageException(StorageException::DRIVER_DOES_NOT_SUPPORT_ABSOLUTE_PATHS, [
                get_class($this->driver
                )
            ]
        );
    }
1319605
public function getStoragePath(string $key = null): string
    {
        if (null === $key) {
            $path = $this->dataFolder;
        } else {
            $path = sprintf($this->dataPattern, $this->dataFolder, $key, substr($key, 0, 2));
        }

        return $path;
    }
1245248
protected function retrieve($key)
        {
            if (!File::exists($this->path . $key)) {
                return null;
            }

            // File based caches store have the expiration timestamp stored in
            // UNIX format prepended to their contents. We'll compare the
            // timestamp to the current time when we read the file.
            if (time() >= substr($cache = fgc($this->path . $key), 0, 10)) {
                return $this->forget($key);
            }

            return unserialize(substr($cache, 10));
        }
92661
public function getFileUrl($key, $path = null)
	{
		if (is_null($key)) {
			return null;
		}

		$bucket = config('filesystems.disks.s3.bucket');
		$client = Storage::disk('s3')->getAdapter()->getClient();

		return $this->getRealUrl($client->getObjectUrl($bucket, $path . $key));
	}
1184661
public static function path( $file = null, $key = null ) 
	{
		// get the storage key
		if ( is_null( $key ) ) 
		{
			$key = static::$default;
		}

		// check if path exists
		if ( !isset( static::$paths[$key] ) ) 
		{
			throw new CCException( 'CCStorage - use of undefined storage path '.$key.'.' );
		}
			
		if ( strpos( $file, ':' ) )
		{
			$file = static::file( $file );
		}
		
		return static::$paths[$key].$file;
	}
920880
public function find($key)
    {
        $path = $this->finder->find($name);

        if ($path && !in_array($path, $this->paths)) {
            array_unshift($this->paths, $path);
        }

        return parent::find($name);
    }
531533
protected function getFileName(string $key): string
    {
        return $this->cacheDir . \DIRECTORY_SEPARATOR . self::CACHE_FILE_PREFIX . $key . self::CACHE_FILE_SUBFIX;
    }
1008553
public function getFile($key)
    {
        $key = str_replace($this->illegalChars, '_', $this->namespace . $key);
        return $this->dir . '/' . $key . '.' . $this->ext;
    }
267543
public function getFolderFrom($key)
    {
        if (array_key_exists($key, $this->allowedImageFolders)) {
            return $this->allowedImageFolders[$key];
        }

        return false;
    }
1177321
private function getHeaderPath($key)
    {
        $parts = explode('/', $key, 2);
        if (count($parts) >= 2) {
            list($extId, $configId) = $parts;
            $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($extId);
            return $ext->getDir().'config/header/'.$configId.'.conf.php';
        } else {
            return null;
        }
    }
1096629
public function get($key)
    {
        $file = $this->makePath($key);
        if (!($data = @file_get_contents($file))) {
            return false;
        }

        if (!($data = @unserialize($data))) {
            $this->delete($key); /* Delete corrupted. */
            return false;
        }

        list($expiry, $value) = $data;
        if ($expiry !== false && ($expiry < microtime(true))) {
            $this->delete($key);
            return false;
        }

        return $value;
    }
321980
public function &offsetGet($key)
    {
        if(!$this->has($key))
            return null;

        return DotArray::getReference($this->storage, $key);
    }
1195410
protected function getFilepath(string $key):string{
		$h = hash('sha256', $key);

		return $this->cachedir.$h[0].DIRECTORY_SEPARATOR.$h[0].$h[1].DIRECTORY_SEPARATOR.$h;
	}
474090
public function getFromCache($key)
    {
        $fileName = $this->getCacheFilePath($key);
        $value = null;
        if (is_readable($fileName)) {
            $value = file_get_contents($fileName);
            if ($value == serialize(false)) {
                return false;
            }

            $value = unserialize($value);
            if ($value === false) {
                $value = null;
            }
        }

        return $value;
    }
1296391
public static function getInstance($key = 'default'): Path
    {
        if (empty($key)) {
            throw new Exception('Invalid object key');
        }

        if (!isset(self::$objects[$key])) {
            self::$objects[$key] = new self();
        }

        return self::$objects[$key];
    }
1213364
private function getFileData($key)
    {
        foreach ($this->getStoredList() as $filePath) {

            $pathinfo = pathinfo($filePath);

            if ($key == $pathinfo['filename'])
                return [
                    'storedPath' => $filePath,
                    'path' => storage_path('app/' . $filePath),
                    'extension' => $pathinfo['extension'],
                    'size' => Storage::size($filePath),
                    'lastModified' => Storage::lastModified($filePath)
                ];
        }

        return false;
    }
249237
public function get($key)
    {
        $filePath = $this->getFilePathFromKey($key);

        if (!file_exists($filePath)) {
            return false;
        }

        if (!is_readable($filePath)) {
            return false;
        }

        $cacheFileData = file_get_contents($filePath);

        if ($this->config['gzipCompression']) {
            $cacheFileData = gzuncompress($cacheFileData);
        }

        $cacheObj = json_decode($cacheFileData);

        // Unable to decode JSON (could happen if compression was turned off while compressed caches still exist)
        if ($cacheObj === null) {
            return false;
        }

        if (!function_exists('sys_getloadavg')) {
            throw new Exception('Your PHP installation does not support `sys_getloadavg` (Windows?). Please set `unixLoadUpperThreshold` to `-1` in your RWFileCache config.');
        }

        if ($this->config['unixLoadUpperThreshold'] == -1) {
            $unixLoad = [0 => PHP_INT_MAX, 1 => PHP_INT_MAX, 2 => PHP_INT_MAX];
        } else {
            $unixLoad = sys_getloadavg();
        }

        if ($cacheObj->expiryTimestamp > time() || $unixLoad[0] >= $this->config['unixLoadUpperThreshold']) {
            // Cache item has not yet expired or system load is too high
            $content = $cacheObj->content;

            if (($unserializedContent = @unserialize($content)) !== false) {
                // Normal unserialization
                $content = $unserializedContent;
            } elseif ($content == serialize(false)) {
                // Edge case to handle boolean false being stored
                $content = false;
            }

            return $content;
        } else {
            // Cache item has expired
            return false;
        }
    }