Neos\Flow\ResourceManagement\Storage\FileSystemStorage::getStreamByResource PHP 메소드

getStreamByResource() 공개 메소드

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
리턴 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;
    }