getSize() 공개 메소드

Get file size
Requires '\Webiny\Component\Storage\Driver\SizeAwareInterface' to be implemented by a Driver class
public getSize ( string $key ) : integer | boolean
$key string
리턴 integer | boolean The size of the file in bytes or false
예제 #1
0
파일: File.php 프로젝트: Webiny/Framework
 /**
  * Get file size in bytes
  *
  * @return int|null Number of bytes or null
  */
 public function getSize()
 {
     if ($this->size === null && $this->storage->supportsSize()) {
         $this->size = $this->storage->getSize($this->key);
     }
     return $this->size;
 }