Returns the size in bytes of this Folder and its contents.

@return int size in bytes of current folder
765986
public function dirsize()
    {
        $size = 0;
        $directory = Folder::slashTerm($this->path);
        $stack = [$directory];
        $count = count($stack);
        for ($i = 0, $j = $count; $i < $j; $i++) {
            if (is_file($stack[$i])) {
                $size += filesize($stack[$i]);
            } elseif (is_dir($stack[$i])) {
                $dir = dir($stack[$i]);
                if ($dir) {
                    while (($entry = $dir->read()) !== false) {
                        if ($entry === '.' || $entry === '..') {
                            continue;
                        }
                        $add = $stack[$i] . $entry;

                        if (is_dir($stack[$i] . $entry)) {
                            $add = Folder::slashTerm($add);
                        }
                        $stack[] = $add;
                    }
                    $dir->close();
                }
            }
            $j = count($stack);
        }

        return $size;
    }
243513
public function sizeToString()
    {
        return $this->type == self::TYPE_FILE
            ? File::sizeToString($this->size)
            : $this->size.' '.trans('system::lang.media.folder_size_items');
    }
316875
def size(self):
        """"""
        total_size = 0
        for dir_path, dir_names, filenames in os.walk(self.dir):
            for f in filenames:
                fp = os.path.join(dir_path, f)
                total_size += os.path.getsize(fp)
        return total_size
726737
public function GetContentLength () {
		if ($this->contentLength === NULL) {
			if (
				isset($this->globalServer['CONTENT_LENGTH']) &&
				ctype_digit($this->globalServer['CONTENT_LENGTH'])
			) $this->contentLength = intval($this->globalServer['CONTENT_LENGTH']);
		}
		return $this->contentLength;
	}
1224094
protected function getAutomaticChunkSize()
    {
        $nh = $this->app->make('helper/number');
        // Maximum size of an uploaded file, minus a small value (just in case)
        $uploadMaxFilesize = (int) $nh->getBytes(ini_get('upload_max_filesize')) - 100;
        // Max size of post data allowed, minus enough space to consider other posted fields.
        $postMaxSize = (int) $nh->getBytes(ini_get('post_max_size')) - 10000;
        if ($uploadMaxFilesize < 1 && $postMaxSize < 1) {
            return 2000000;
        }
        if ($uploadMaxFilesize < 1) {
            return $postMaxSize;
        }
        if ($postMaxSize < 1) {
            return $uploadMaxFilesize;
        }

        return min($uploadMaxFilesize, $postMaxSize);
    }
250675
public function getSize()
    {
        if (is_null($this->size)) {
            $this->size = is_null($this->getFile()) ? 0 : $this->getFile()->getSize();
        }
        return $this->size;
    }
402863
public function getArchiveSize() {
        if (!is_resource($this->zipFile)) {
            return strlen($this->zipData);
        }
        $filestat = fstat($this->zipFile);

        return $filestat['size'];
    }
293487
public function getLength()
	{
		if (is_null($this->length)) {
			$this->length = filesize($this->path);
		}
		return $this->length;
	}
146544
public function getSize()
    {
        // If the stream is a file based stream and local, then use fstat
        clearstatcache(true, $this->getPath());

        $info = $this->getInfo();

        if (isset($info['size'])) {
            $size = $info['size'];
        } else {
            $size = strlen((string) $this->toString());
        }

        return $size;
    }
986560
public function getWidth()
    {
      if ($this->width != null) {
        return $this->width;
      }

      list($width) = getimagesize($this->_files['tmp_name']);

      return $width;
    }
1285600
public function size(): int {
        if ($this->tail > $this->head) return 0;
        return $this->head - $this->tail;
    }
614386
public function getSize() : ?string 
    {
        if ( ! $this->hasSize()) {
            $this->setSize($this->getDefaultSize());
        }
        return $this->size;
    }
101232
public function convertToByte()
        {
            $type = $this->getType();
            $size = $this->getSize();
            $selectedType = $this->sizeTypes[$type];

            return ($selectedType * $size);
        }
1336497
public function diskUsage()
    {
        if (is_dir($this->path)) {
            $diskUsage = 0;
            $iterator = new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator(
                    $this->path,
                    \RecursiveDirectoryIterator::SKIP_DOTS
                )
            );

            foreach ($iterator as $file) {
                $diskUsage += $file->getSize();
            }
            return $diskUsage;
        }

        return filesize($this->path);
    }
701105
public function getSize()
    {
        return $this->oxarticles__oxlength->value *
                 $this->oxarticles__oxwidth->value *
                 $this->oxarticles__oxheight->value;
    }
797179
protected function fileSize() {

		$filesize = isset( $this->meta['filesize'] ) ? $this->meta['filesize'] : '';

		if ( ! $filesize ) {
			$file = get_attached_file( $this->post->ID );

			if ( file_exists( $file ) ) {
				$filesize = filesize( $file );
			}
		}

		if ( $filesize ) {

			$filesize = size_format( strip_tags( $filesize ), 2 );
		}

		return $filesize;
	}
970792
public function getSize()
    {
        // This can only work on streamable files, so basically local files,
        // still only perform it once even on local files to avoid bothering the filesystem.php g
        if ($this->filesystem->getAdapter() instanceof StreamFactory && !$this->size) {
            if ($this->streamWrapperPrefix) {
                try {
                    $this->setSize(filesize($this->streamWrapperPrefix.$this->getKey()));
                } catch (\Exception $e) {
                    // Fail gracefully if there was a problem with opening the file and
                    // let gaufrette load the file into memory allowing it to throw exceptions
                    // if that doesn't work either.
                    // Not empty to make the scrutiziner happy.
                    return parent::getSize();
                }
            }
        }

        return parent::getSize();
    }