$partFile =
$destinationUri . '.part';
$partFile =
new SplFileObject($partFile, 'a+'
);
$size =
$partFile->
getSize();
if ($size >=
$totalSize) { $this->
verifyHash($partFile,
$hash);
// close local file connections before move for windows
$partFilePath =
$partFile->
getPathname();
fclose($destination);
unset($partFile);
$this->
moveFile($partFilePath,
$destinationUri);
return 0;
} $range =
$size . '-' .
($totalSize - 1
);
if (!\
function_exists('curl_init'
)) { throw new Exception('PHP Extension "curl" is required to download a file'
);
} // Configuration of curl