예제 #1
0
파일: FileEntity.php 프로젝트: sndsgd/fs
 /**
  * Get the filesize as a formatted string
  *
  * @param int $precision The number of decimal places to return
  * @param string $point The decimal point
  * @param string $sep The thousands separator
  * @return string An empty string if the size could not be determined
  */
 public function getSize(int $precision = 0, string $point = ".", string $sep = ",") : string
 {
     $bytes = $this->getByteSize();
     if ($bytes === -1) {
         return "";
     }
     return \sndsgd\Fs::formatSize($bytes, $precision, $point, $sep);
 }