public function DirectoryResource::isFresh

Checks if a timestamp represents the latest resource.

Parameters

integer $timestamp A UNIX timestamp:

Return value

Boolean True if the timestamp is up to date

Overrides ResourceInterface::isFresh

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php, line 40

Class

DirectoryResource
A resource is something formulae can be loaded from.

Namespace

Assetic\Factory\Resource

Code

public function isFresh($timestamp) {
  if (!is_dir($this->path) || filemtime($this->path) > $timestamp) {
    return false;
  }
  foreach ($this as $resource) {
    if (!$resource
      ->isFresh($timestamp)) {
      return false;
    }
  }
  return true;
}