Neos\Flow\ResourceManagement\Storage\FileSystemStorage::getStreamByResource PHP Method

getStreamByResource() public method

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.
public getStreamByResource ( PersistentResource $resource ) : resource | boolean
$resource Neos\Flow\ResourceManagement\PersistentResource The resource stored in this storage
return resource | boolean | boolean The resource stream or FALSE if the stream could not be obtained
    public function getStreamByResource(PersistentResource $resource)
    {
        $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());
        return file_exists($pathAndFilename) ? fopen($pathAndFilename, 'rb') : false;
    }