_client = $client; $this->_file_id = $file_id; $this->_destination = $destination; } /** * @param int $start * @param int $end * * @return int * @throws IOException */ public function download(int $start, int $end):int { return $this->_client->_retries(function() use ($start, $end) { return $this->_client->getClient()->downloadChunk($this->_file_id, $this->_destination, $start, $end); }, "Failed downloading chunk"); } }