Returns the file size, in bytes, or false, on failure

Files larger than 4GB will show up as being exactly 4GB.

@param string $filename
@return mixed
@access public
542269
function size($filename)
    {
        if (!($this->bitmap & SSH2::MASK_LOGIN)) {
            return false;
        }

        $result = $this->stat($filename);
        if ($result === false) {
            return false;
        }
        return isset($result['size']) ? $result['size'] : -1;
    }
132343
public function getFile($filename)
    {
        $filename = $this->outDir.DIRECTORY_SEPARATOR.$filename;
        $this->mkdir(dirname($filename));
        if (is_file($filename) && $this->backup) {
            @rename($filename, sprintf('%s.bak', $filename));
        }

        return $filename;
    }
88986
protected function load($filename)
    {
        $success = false;

        if (file_exists($filename)) {
            /** @noinspection PhpIncludeInspection */
            require $filename;
            $success = true;
        }

        return $success;
    }
1080162
public static function identifyImage($filename)
    {
        $dpi = static::getImageDpi($filename);
        $data = [];
        $data['dpi_x'] = $dpi[0];
        $data['dpi_y'] = $dpi[1];

        // Sometimes it returns 10752, which is (WHY?!) 72 dpi
        if (10752 === $data['dpi_x']) {
            $data['dpi_x'] = 72;
        }
        if (10752 === $data['dpi_y']) {
            $data['dpi_y'] = 72;
        }

        $info = getimagesize($filename);
        $data['image_w'] = $info[0];
        $data['image_h'] = $info[1];
        $data['bits'] = $info['bits'];
        $data['channels'] = '';
        if (3 === $info['channels']) {
            $data['channels'] = 'RGB';
        }
        if (4 === $info['channels']) {
            $data['channels'] = 'CMYK';
        }

        return $data;
    }
882924
public static function sizeCount($filesize)
    {
        if ($filesize >= 1073741824)
        {
            $filesize = round($filesize / 1073741824 * 100) / 100 . ' GB';
        }
        elseif ($filesize >= 1048576)
        {
            $filesize = round($filesize / 1048576 * 100) / 100 . ' MB';
        }
        elseif ($filesize >= 1024)
        {
            $filesize = round($filesize / 1024 * 100) / 100 . ' KB';
        }
        else
        {
            $filesize = $filesize . ' Bytes';
        }
        return $filesize;
    }
1341368
public function getSize()
    {
        if ($this->isDirty && $this->bytes) {
            return strlen($this->bytes);
        }
        if ($this->isDirty && $this->filename) {
            return filesize($this->filename);
        }
        if ($this->mongoGridFSFile instanceof \MongoGridFSFile) {
            return $this->mongoGridFSFile->getSize();
        }
        return 0;
    }
545934
public function size($filename)
    {
        if ($this->exists($filename) && $this->isFile($filename)) {
            return filesize($filename);
        }
        throw new FileNotFoundException('File not found in the path [ ' . $filename . ' ].');
    }
132120
def size(filename, format='decimal'):
    '''
    

    '''
    if isinstance(filename, file):
        filename = filename.name

    return filesize(os.stat(filename)[stat.ST_SIZE], format)
1346109
public function getFile($fileName)
    {
        $result = false;

        if (isset($_FILES[$fileName])) {
            $result = $_FILES[$fileName];
        }

        return $result;
    }
1174754
public function filesize()
	{
		if ($this->use_include_path) {
			return filesize(stream_resolve_include_path($this->_fhandle));
		} else {
			return filesize($this->_fhandle);
		}
	}
251824
public function formatFileSize($fileSize)
    {
        //don't format if it's already formatted.
        $validUnits = ['KB', 'MB', 'GB', 'TB'];

        foreach ($validUnits as $unit) {
            if (strpos($unit, $fileSize)) {
                return $fileSize;
            }
        }

        if ($fileSize < 1024) {
            return $fileSize.' B';
        } elseif ($fileSize < 1048576) {
            return round($fileSize / 1024, 2).' KB';
        } elseif ($fileSize < 1073741824) {
            return round($fileSize / 1048576, 2).' MB';
        } elseif ($fileSize < 1099511627776) {
            return round($fileSize / 1073741824, 2).' GB';
        }

        return round($fileSize / 1099511627776, 2).' TB';
    }
674829
protected function getSize($value)
    {
        if (is_numeric($value)) {
            return $value;
        } elseif (is_array($value)) {
            return count($value);
        } elseif ($value instanceof \SplFileObject) {
            return $value->getSize() / 1024;
        }

        return mb_strlen($value);
    }
484962
function size($filename)
    {
        if (!($this->bitmap & NET_SSH2_MASK_LOGIN)) {
            return false;
        }

        $result = $this->stat($filename);
        if ($result === false) {
            return false;
        }
        return isset($result['size']) ? $result['size'] : -1;
    }
30854
public static function readfileChunked($filename)
    {
        $chunksize = 1024 * 10; // how many bytes per chunk

        $handle = fopen($filename, 'rb');
        if ($handle === false) {
            return false;
        }
        while (!feof($handle)) {
            echo fread($handle, $chunksize);
            @ob_flush();
            flush();
            @set_time_limit(8);
        }
        fclose($handle);
        return true;
    }
866003
public function getFile( $fileName )
	{
		if( !$this->numFiles )
			return NULL;
		foreach( $this->files as $key => $information )
			if( $information['name'] == $fileName )
				return $information;
	}
832928
public function filesize()
    {
        $path = $this->basePath();

        if (file_exists($path) && is_file($path)) {
            return filesize($path);
        }
        
        return false;
    }
565026
public function findImageSize($sizeName)
	{
		if ($this->imageSizes->containsKey($sizeName)) {
			return $this->imageSizes->get($sizeName);
		} else {
			return null;
		}
	}