original_string: protected function _sendFile($file, $range)
      {
          deprecationWarning('Will be removed in 4.0.0');
  
          ob_implicit_flush(true);
  
          $file->open('rb');
  
          $end = $start = false;
          if ($range) {
              list($start, $end) = $range;
          }
          if ($start !== false) {
              $file->offset($start);
          }
  
          $bufferSize = 8192;
          if (strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
              set_time_limit(0);
          }
          session_write_close();
          while (!feof($file->handle)) {
              if (!$this->_isActive()) {
                  $file->close();
  
                  return false;
              }
              $offset = $file->offset();
              if ($end && $offset >= $end) {
                  break;
              }
              if ($end && $offset + $bufferSize >= $end) {
                  $bufferSize = $end - $offset + 1;
              }
              echo fread($file->handle, $bufferSize);
          }
          $file->close();
  
          return true;
      }
code: protected function _sendFile($file, $range)
      {
          deprecationWarning('Will be removed in 4.0.0');
  
          ob_implicit_flush(true);
  
          $file->open('rb');
  
          $end = $start = false;
          if ($range) {
              list($start, $end) = $range;
          }
          if ($start !== false) {
              $file->offset($start);
          }
  
          $bufferSize = 8192;
          if (strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
              set_time_limit(0);
          }
          session_write_close();
          while (!feof($file->handle)) {
              if (!$this->_isActive()) {
                  $file->close();
  
                  return false;
              }
              $offset = $file->offset();
              if ($end && $offset >= $end) {
                  break;
              }
              if ($end && $offset + $bufferSize >= $end) {
                  $bufferSize = $end - $offset + 1;
              }
              echo fread($file->handle, $bufferSize);
          }
          $file->close();
  
          return true;
      }
code_tokens: protected function _sendFile ( $ file , $ range ) { deprecationWarning ( 'Will be removed in 4.0.0' ) ; ob_implicit_flush ( true ) ; $ file -> open ( 'rb' ) ; $ end = $ start = false ; if ( $ range ) { list ( $ start , $ end ) = $ range ; } if ( $ start !== false ) { $ file -> offset ( $ start ) ; } $ bufferSize = 8192 ; if ( strpos ( ini_get ( 'disable_functions' ) , 'set_time_limit' ) === false ) { set_time_limit ( 0 ) ; } session_write_close ( ) ; while ( ! feof ( $ file -> handle ) ) { if ( ! $ this -> _isActive ( ) ) { $ file -> close ( ) ; return false ; } $ offset = $ file -> offset ( ) ; if ( $ end && $ offset >= $ end ) { break ; } if ( $ end && $ offset + $ bufferSize >= $ end ) { $ bufferSize = $ end - $ offset + 1 ; } echo fread ( $ file -> handle , $ bufferSize ) ; } $ file -> close ( ) ; return true ; }
docstring: Reads out a file, and echos the content to the client.
  
  @param \Cake\Filesystem\File $file File object
  @param array $range The range to read out of the file.
  @return bool True is whole file is echoed successfully or false if client connection is lost in between
  @deprecated 3.4.0 Will be removed in 4.0.0
docstring_tokens: Reads out a file and echos the content to the client .