Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function getSize($pathOrUuid)
 {
     $path = $this->convertToPath($pathOrUuid);
     $this->guardNoInvalidUuid($pathOrUuid, $path);
     $this->guardInUploadPath($path);
     return $this->adapter->getSize($path);
 }
 /**
  * {@inheritdoc}
  */
 public function getSize($path)
 {
     if ($this->mainAdapter->has($path)) {
         return $this->mainAdapter->getSize($path);
     }
     return $this->fallback->getSize($path);
 }
Пример #3
0
 /**
  * Get a file's size.
  *
  * @param string $path path to file
  *
  * @return int|false file size or FALSE when fails
  *                   to check size of existing file
  */
 public function getSize($path)
 {
     $path = Util::normalizePath($path);
     if (($object = $this->adapter->getSize($path)) === false || !isset($object['size'])) {
         return false;
     }
     return (int) $object['size'];
 }
Пример #4
0
 /**
  * Get a file's size.
  *
  * @param string $path path to file
  *
  * @return int|false file size or FALSE when fails
  *                   to check size of existing file
  */
 public function getSize($path)
 {
     $path = Util::normalizePath($path);
     $cached = $this->cache->getSize($path);
     if ($cached !== false) {
         return $cached;
     }
     if (($object = $this->adapter->getSize($path)) === false || !isset($object['size'])) {
         return false;
     }
     $this->cache->updateObject($path, $object, true);
     return (int) $object['size'];
 }
Пример #5
0
 /**
  * {@inheritdoc}
  */
 public function getSize($path)
 {
     return $this->adapter->getSize($this->getPath($path));
 }
Пример #6
0
 /**
  * {@inheritdoc}
  */
 public function getSize($path)
 {
     return $this->source->getSize($path);
 }
Пример #7
0
 /**
  * {@inheritdoc}
  */
 public function getSize(string $path)
 {
     $size = $this->driver->getSize($path);
     return !$size ?: $size['size'];
 }