public static function fileSize($check, $operator = null, $size = null)
    {
        $file = static::getFilename($check);
        if ($file === false) {
            return false;
        }

        if (is_string($size)) {
            $size = Text::parseFileSize($size);
        }
        $filesize = filesize($file);

        return static::comparison($filesize, $operator, $size);
    }
public static function fileSize($check, $operator = null, $size = null)
    {
        $file = static::getFilename($check);
        if ($file === false) {
            return false;
        }

        if (is_string($size)) {
            $size = Text::parseFileSize($size);
        }
        $filesize = filesize($file);

        return static::comparison($filesize, $operator, $size);
    }
public static function fileSize ( $ check , $ operator = null , $ size = null ) { $ file = static :: getFilename ( $ check ) ; if ( $ file === false ) { return false ; } if ( is_string ( $ size ) ) { $ size = Text :: parseFileSize ( $ size ) ; } $ filesize = filesize ( $ file ) ; return static :: comparison ( $ filesize , $ operator , $ size ) ; }
Checks the filesize

Will check the filesize of files/UploadedFileInterface instances
by checking the filesize() on disk and not relying on the length
reported by the client.

@param string|array|\Psr\Http\Message\UploadedFileInterface $check Value to check.
@param string|null $operator See `Validation::comparison()`.
@param int|string|null $size Size in bytes or human readable string like '5MB'.
@return bool Success
Checks the filesize