Returns Size of current File.
@access		public
@param		int			$precision		Precision of rounded Size (only if unit is set)
@return		int
502505
public function getSize( $precision = NULL )
	{
		$size	= filesize( $this->fileName );
		if( $precision )
		{
			$size	= Alg_UnitFormater::formatBytes( $size, $precision );
		}
		return $size;
	}
795683
public function getSize()
    {
        if ($this->isDirty && $this->bytes) {
            return strlen($this->bytes);
        }
        if ($this->isDirty && $this->filename) {
            return filesize($this->filename);
        }
        if ($this->riakGridFSFile instanceof \RiakGridFSFile) {
            return $this->riakGridFSFile->getSize();
        }
        return 0;
    }
1336996
public static function floor($num, int $precision=0) {
		ref\format::floor($num, $precision);
		return $num;
	}
579583
public static function convertUnitFileSize($size)
    {
        $units = [" B", " KB", " MB", " GB"];
        $calculatedSize = $size;
        $unit = Arrays::first($units);
        if ($size) {
            $calculatedSize = round($size / pow(1024, ($i = (int)floor(log($size, 1024)))), 2);
            $unit = $units[$i];
        }
        return $calculatedSize . $unit;
    }
879142
public function getIsDecimalEven( $precision = false )
	{
		if ( ! $this->getIsDecimal() ) {
			return false;
		}

		if ( $precision === false ) $precision = $this->scale( $this->_value );
		if ( $precision < 0 ) $precision = $precision = 0;

		$decimalPart = $this->getDecimalPart();
		if ( $precision >= strlen( $decimalPart ) ) return false;

		// Get the portion of the decimal part affected by the scale value
		$decimalPart = substr( $decimalPart, $precision );
		return $decimalPart[0] % 2 === 0;
	}
250675
public function getSize()
    {
        if (is_null($this->size)) {
            $this->size = is_null($this->getFile()) ? 0 : $this->getFile()->getSize();
        }
        return $this->size;
    }
164346
public function size()
    {
        $position = ftell($this->_fileHandle);
        fseek($this->_fileHandle, 0, SEEK_END);
        $size = ftell($this->_fileHandle);
        fseek($this->_fileHandle, $position);

        return $size;
    }
69697
public static function fileSize($size)
    {
        $units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'];

        for ($i = 0; $size > 1024; $i++) {
            $size /= 1024;
        }

        return __('Size unit ' . $units[$i], round($size, 2));
    }
729287
public function getFormattedSize(
        int $precision = 0,
        string $point = ".",
        string $sep = ","
    ): string
    {
        return \sndsgd\Fs::formatSize($this->size, $precision, $point, $sep);
    }
209216
public static function size(string $path) : ?int
    {
        $size = filesize($path);
        return $size === false ? null : $size;
    }
1186210
public function getSize() : int
    {
        $files = $this->getFiles();
        $size = 0;
        foreach($files as $file) {
            $size += $file->getSize();
        }
        return $size;
    }
1115187
public static function readableFilesize($size, $precision = 2)
    {
        $result = $size;
        $index = 0;
        while ($result > 1024 && $index < count(self::$prefixes)) {
            $result = $result / 1024;
            $index++;
        }

        return sprintf('%1.'.$precision.'f %sB', $result, self::$prefixes[$index]);
    }
543191
public function getExpectedSize($round = true)
	{
		if (empty($this->sourceFilename)) {
			throw new ImageProcessorException('Source image is not set');
		}
		if (empty($this->targetWidth) || ($this->targetWidth <= 0)) {
			throw new ImageProcessorException('Target width is not set or is invalid');
		}
		if (empty($this->targetHeight) || ($this->targetHeight <= 0)) {
			throw new ImageProcessorException('Target height is not set or is invalid');
		}

		$imageInfo = $this->getImageInfo($this->sourceFilename);

		$wRatio = max($imageInfo->getWidth() / $this->targetWidth, 1);
		$hRatio = max($imageInfo->getHeight() / $this->targetHeight, 1);

		if ( ! $this->cropMode) {
			$wRatio = $hRatio = max($wRatio, $hRatio);
		}

		$dimensions = array(
			'width' => $imageInfo->getWidth() / $wRatio,
			'height' => $imageInfo->getHeight() / $hRatio,
		);

		if ($round) {
			$dimensions = array_map('round', $dimensions);
		}

		return $dimensions;
	}
390573
private function calc_size( $value ) {

		$type = gettype( $value );

		switch ( $type ) {
			case 'string' :
				return function_exists( 'mb_strlen' ) ? mb_strlen( $value ) : strlen( $value );
			case 'integer' :
			case 'double' :
			case 'boolean' :
				return (int) $value;
			case 'array' :
			case 'object' :
				return count( $value );
		}

		return - 1;

	}
1035623
public static function bytesToHumanReadableSize($size, $precision = 2)
    {
        for ($i = 0; ($size / 1024) > 0.9; $i++, $size /= 1024) {
        }

        return round($size, $precision).' '.['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'][$i];
    }
1029033
public static function bytesTo($size, $precision = 0) {
        $sizes = array('YB', 'ZB', 'EB', 'PB', 'TB', 'GB', 'MB', 'KB', 'B');
        $total = count($sizes);

        while ($total-- && $size >= 1024) {
            $size /= 1024;
        }

        return static::precision($size, $precision) . $sizes[$total];
    }
1225444
public static function formatNumber( $float, $unit = 1, $precision = 0 )
	{
		Deprecation::getInstance()->setExceptionVersion( '0.8' )
			->message(  'Use one of the other methods instead' );
		if( (int) $unit )
		{
			$float	= $float / $unit;
			if( is_int( $precision ) )
				$float	= round( $float, $precision );
		}
		return $float;
	}