MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / createCacheSignature

Function createCacheSignature

src/bzrobots/bzrobots.cpp:370–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368
369
370static void createCacheSignature() {
371 // This file is to be used by archiving and mirroring tools avoid
372 // this directory (and any of its sub-directories). Please see:
373 // < http://www.brynosaurus.com/cachedir/ >
374
375 const char cacheSignature[] = "Signature: 8a477f597d28d172789f06886806bc55\n";
376 const char cacheComment[] =
377 "# This file is a cache directory tag created by BZFlag.\n"
378 "# For information about cache directory tags, see:\n"
379 "# http://www.brynosaurus.com/cachedir/\n";
380 std::string cacheTagName = getCacheDirName();
381 cacheTagName += "CACHEDIR.TAG";
382 std::ostream* cacheTag = FILEMGR.createDataOutStream(cacheTagName, true, true);
383 if (cacheTag != NULL) {
384 cacheTag->write(cacheSignature, (std::streamsize)strlen(cacheSignature));
385 cacheTag->write(cacheComment, (std::streamsize)strlen(cacheComment));
386 }
387 delete cacheTag;
388
389 return;
390}
391
392void setupBZDB(void) {
393 // set default DB entries

Callers 1

mainFunction · 0.70

Calls 3

getCacheDirNameFunction · 0.85
createDataOutStreamMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected