You are here

public function Twig_Loader_Filesystem::isFresh in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Loader/Filesystem.php \Twig_Loader_Filesystem::isFresh()

Returns true if the template is still fresh.

Parameters

string $name The template name:

timestamp $time The last modification time of the cached template:

Return value

bool true if the template is fresh, false otherwise

Throws

Twig_Error_Loader When $name is not found

Overrides Twig_LoaderInterface::isFresh

File

vendor/Twig/Loader/Filesystem.php, line 164

Class

Twig_Loader_Filesystem
Loads template from the filesystem.

Code

public function isFresh($name, $time) {
  return filemtime($this
    ->findTemplate($name)) <= $time;
}