MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / getRemoteFileSize

Function getRemoteFileSize

src/onlineLauncher.cpp:250–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250bool getRemoteFileSize(const String &url, size_t &size, const char *hwid = nullptr) {
251 LauncherHttpResponse response;
252 if (!launcherHttpGetRange(url.c_str(), 0, 1, discardHttpCb, nullptr, &response, hwid)) return false;
253 if (response.status != 206) return false;
254 return parseContentRangeTotal(response.content_range, size);
255}
256
257struct FileDownloadContext {
258 File *file;

Callers 2

installFirmwareDynamicFunction · 0.85
installFirmwareFunction · 0.85

Calls 2

launcherHttpGetRangeFunction · 0.85
parseContentRangeTotalFunction · 0.85

Tested by

no test coverage detected