MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / GetCachedLastModified

Function GetCachedLastModified

src/TexturePack.c:408–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408static cc_string GetCachedLastModified(const cc_string* url) {
409 int i;
410 cc_string entry = GetCachedTag(url, &lastModCache);
411 /* Entry used to be a timestamp of C# DateTime ticks since 01/01/0001 */
412 /* Check whether timestamp entry is old or new format */
413 for (i = 0; i < entry.length; i++) {
414 if (entry.buffer[i] < '0' || entry.buffer[i] > '9') return entry;
415 }
416
417 /* Entry is all digits, so the old unsupported format */
418 entry.length = 0; return entry;
419}
420
421static cc_string GetCachedETag(const cc_string* url) {
422 return GetCachedTag(url, &etagCache);

Callers 1

DownloadAsyncFunction · 0.85

Calls 1

GetCachedTagFunction · 0.85

Tested by

no test coverage detected