public function FileAsset::getLastModified

Returns the time the current asset was last modified.

Return value

integer|null A UNIX timestamp

Overrides AssetInterface::getLastModified

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php, line 68

Class

FileAsset
Represents an asset loaded from a file.

Namespace

Assetic\Asset

Code

public function getLastModified() {
  $source = PathUtils::resolvePath($this->source, $this
    ->getVars(), $this
    ->getValues());
  if (!is_file($source)) {
    throw new \RuntimeException(sprintf('The source file "%s" does not exist.', $source));
  }
  return filemtime($source);
}