lib/FileWrapper.php
protected function readFromFilesystem(): void
    {
        if (is_null($this->path)) {
            throw \AWonderPHP\FileWrapper\NullPropertyException::propertyIsNull('path');
        }
        $chunk = $this->chunksize;
        $sent = 0;
        $fp = fopen($this->path, 'rb');
        fseek($fp, $this->start);
        while (!feof($fp)) {
            if (($this->total - $sent) < $chunk) {
                $chunk = $this->total - $sent;
            }
            print(fread($fp, $chunk));
            flush();
            ob_flush();
            $sent = $sent + $chunk;
            if ($sent >= $this->total) {
                break;
            }
        }
        fclose($fp);
    }
protected function readFromFilesystem(): void
    {
        if (is_null($this->path)) {
            throw \AWonderPHP\FileWrapper\NullPropertyException::propertyIsNull('path');
        }
        $chunk = $this->chunksize;
        $sent = 0;
        $fp = fopen($this->path, 'rb');
        fseek($fp, $this->start);
        while (!feof($fp)) {
            if (($this->total - $sent) < $chunk) {
                $chunk = $this->total - $sent;
            }
            print(fread($fp, $chunk));
            flush();
            ob_flush();
            $sent = $sent + $chunk;
            if ($sent >= $this->total) {
                break;
            }
        }
        fclose($fp);
    }
Reads the file or portion of binary file from the filesystem and sends it to the
client.

@return void