/**
  * {@inheritDoc}
  */
 public function getTimestamp($pathOrUuid)
 {
     $path = $this->convertToPath($pathOrUuid);
     $this->guardNoInvalidUuid($pathOrUuid, $path);
     $this->guardInUploadPath($path);
     return $this->adapter->getTimestamp($path);
 }
 /**
  * {@inheritdoc}
  */
 public function getTimestamp($path)
 {
     if ($this->mainAdapter->has($path)) {
         return $this->mainAdapter->getTimestamp($path);
     }
     return $this->fallback->getTimestamp($path);
 }
 /**
  * {@inheritdoc}
  */
 public function getTimestamp(string $path)
 {
     if (!$this->has($path)) {
         throw new FileNotFoundException($path);
     }
     $getTimestamp = $this->driver->getTimestamp($path);
     return !$getTimestamp ?: $getTimestamp['timestamp'];
 }
Beispiel #4
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 (!($object = $this->adapter->getTimestamp($path))) {
         return false;
     }
     return $object['timestamp'];
 }
Beispiel #5
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'];
 }
Beispiel #6
0
 /**
  * {@inheritdoc}
  */
 public function getTimestamp($path)
 {
     return $this->adapter->getTimestamp($this->getPath($path));
 }
Beispiel #7
0
 function it_fetches_mtime(AdapterInterface $adapter)
 {
     $adapter->getTimestamp('filename')->willReturn(1457104978);
     $this->mtime('filename')->shouldReturn(1457104978);
 }
 /**
  * {@inheritdoc}
  */
 public function getTimestamp($path)
 {
     return $this->source->getTimestamp($path);
 }
Beispiel #9
0
 /**
  * {@inheritdoc}
  */
 public function mtime($key)
 {
     return $this->adapter->getTimestamp($key);
 }