protected function getFileOrFail($name)
    {
        if (!$this->filesystem->has($this->resolveTemplateName($name))) {
            throw new Twig_Error_Loader('Template could not be found on the given filesystem');
        }

        $fileObject = $this->filesystem->get($this->resolveTemplateName($name));
        if ($fileObject->isDir()) {
            throw new Twig_Error_Loader('Cannot use directory as template');
        }

        return $fileObject;
    }
protected function getFileOrFail($name)
    {
        if (!$this->filesystem->has($this->resolveTemplateName($name))) {
            throw new Twig_Error_Loader('Template could not be found on the given filesystem');
        }

        $fileObject = $this->filesystem->get($this->resolveTemplateName($name));
        if ($fileObject->isDir()) {
            throw new Twig_Error_Loader('Cannot use directory as template');
        }

        return $fileObject;
    }
protected function getFileOrFail ( $ name ) { if ( ! $ this -> filesystem -> has ( $ this -> resolveTemplateName ( $ name ) ) ) { throw new Twig_Error_Loader ( 'Template could not be found on the given filesystem' ) ; } $ fileObject = $ this -> filesystem -> get ( $ this -> resolveTemplateName ( $ name ) ) ; if ( $ fileObject -> isDir ( ) ) { throw new Twig_Error_Loader ( 'Cannot use directory as template' ) ; } return $ fileObject ; }
Checks if the underlying flysystem contains a file of the given name.

@param string $name

@return \League\Flysystem\File|\League\Flysystem\Handler
@throws Twig_Error_Loader
Checks if the underlying flysystem contains a file of the given name .