Ejemplo n.º 1
0
 /**
  * Get a file's timestamp.
  *
  * @param string $path path to file
  *
  * @throws FileNotFoundException
  *
  * @return string|false timestamp or FALSE when fails
  *                      to fetch timestamp from existing file
  */
 public function getTimestamp($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($timestamp = $this->cache->getTimestamp($path)) {
         return $timestamp;
     }
     if (!($object = $this->adapter->getTimestamp($path))) {
         return false;
     }
     $object = $this->cache->updateObject($path, $object, true);
     return $object['timestamp'];
 }