Returns the file size in bytes. If the file does not exist or cannot be
fetched, 0 is returned.

@return int
962297
public function getSize(): int
    {
        if ($this->caching == false) {
            return filesize($this->getAbsoluteFilePath());
        }

        if ($this->size == null) {
            $this->size = filesize($this->getAbsoluteFilePath());
        }

        return $this->size;
    }
308300
protected function getResourceLength(): int
    {
        if (null === $this->fileName) {
            return parent::getResourceLength();
        }

        if (substr($this->fileName, 0, 16) === 'compress.zlib://') {
            return filesize(substr($this->fileName, 16));
        } elseif (substr($this->fileName, 0, 17) === 'compress.bzip2://') {
            return filesize(substr($this->fileName, 17));
        }

        return parent::getResourceLength();
    }
1184100
public function getFullLength()
    {
        $cmd_length = 1;

        $rl_length = strlen($this->remaining_length_bytes);

        return $cmd_length + $rl_length + $this->remaining_length;
    }
991890
public function getSize()
    {
        if (! $this->size && $this->isAttached() === true) {
            $stats = fstat($this->stream);
            $this->size = isset($stats['size']) ? $stats['size'] : null;
        }

        return $this->size;
    }
999797
public function length()
    {
        $length = 0;

        foreach ($this->_streams as $stream) {
            $len = $stream->length();
            if ($len === null) {
                return;
            }
            $length += $len;
        }
        return $length;
    }
334581
public function getRootTotalSize() {
        $path = rtrim($this->path_to_files, '/') . '/';
        $result = $this->getDirSummary($path);
        return $result['size'];
    }
831063
public function filesize()
	{
		if (!$this->filename)
		{
			throw new \RuntimeException('File not open');
		}

		// Capture PHP errors
		$php_errormsg = '';
		$track_errors = ini_get('track_errors');
		ini_set('track_errors', true);
		$res = @filesize($this->filename);

		if (!$res)
		{
			$tmp_error = '';

			if ($php_errormsg)
			{
				// Something went wrong.
				// Store the error in case we need it.
				$tmp_error = $php_errormsg;
			}

			$res = Helper::remotefsize($this->filename);

			if (!$res)
			{
				if ($tmp_error)
				{
					// Use the php_errormsg from before
					throw new \RuntimeException($tmp_error);
				}
				else
				{
					// Error but nothing from php? How strange! Create our own
					throw new \RuntimeException('Failed to get file size. This may not work for all streams.');
				}
			}
			else
			{
				$this->filesize = $res;
				$retval = $res;
			}
		}
		else
		{
			$this->filesize = $res;
			$retval = $res;
		}

		// Restore error tracking to what it was before.
		ini_set('track_errors', $track_errors);

		// Return the result
		return $retval;
	}
1173142
public function fullByteSize()
    {
        $size = $this->byteSize();
        foreach ($this->members as $variable) {
            $size += $variable->fullByteSize();
        }
        return $size;
    }
919380
def GetByteSize(self):
    
    if self.size == definitions.SIZE_NATIVE or self.units != 'bytes':
      return None

    return self.size
535645
public function getReadableFilesize()
    {
        $size = $this->filesize;
        if ($size < 1) {
            return $size;
        }

        if ($size < 1024) {
            return $size.'b';
        } else {
            $help = $size / 1024;
            if ($help < 1024) {
                return round($help, 1).'kb';
            } else {
                return round(($help / 1024), 1).'mb';
            }
        }
    }
206256
public function remainingBytes(): int
    {
        /** @var array $stat */
        $stat = \fstat($this->fp);
        /** @var int $pos */
        $pos = \ftell($this->fp);
        return (int) (
            PHP_INT_MAX & (
                (int) $stat['size'] - $pos
            )
        );
    }
1226810
public function getMaxFileSize(): int
    {
        if ($this->maxFileSize === null) {
            $value = ini_get("upload_max_filesize");
            $units = "BKMGT";
            $unit = preg_replace("/[^$units]/i", "", $value);
            $value = floatval($value);
            if ($unit) {
                $value *= pow(1024, stripos($units, $unit[0]));
            }
            $this->maxFileSize = (int) $value;
        }
        return $this->maxFileSize;
    }
1014605
public function getFileSize()
    {
        $oFile = oxNew(\OxidEsales\Eshop\Application\Model\File::class);
        $oFile->load($this->oxorderfiles__oxfileid->value);

        return $oFile->getSize();
    }
101232
public function convertToByte()
        {
            $type = $this->getType();
            $size = $this->getSize();
            $selectedType = $this->sizeTypes[$type];

            return ($selectedType * $size);
        }
485469
public function size()
	{
		if ($this->is_empty())
			return 0;

		$count = 0;

		foreach ($this->errors as $attribute => $error)
			$count += count($error);

		return $count;
	}
30042
public function getSize()
    {
        return isset($this->_data[Horde_Imap_Client::FETCH_SIZE])
            ? $this->_data[Horde_Imap_Client::FETCH_SIZE]
            : 0;
    }
1315879
public int getImageSize() {
		int filePages = (int) header.get(FILE_PAGES);
		int lastPageSize = (int) header.get(LAST_PAGE_SIZE);

		int imageSize = (filePages - 1) * PAGE_SIZE + lastPageSize;
		if (lastPageSize == 0) {
			imageSize += PAGE_SIZE;
		}
		return imageSize;
	}