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

Function createCacheSignature

src/bzflag/bzflag.cpp:715–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713
714
715static void createCacheSignature() {
716 // This file is to be used by archiving and mirroring tools avoid
717 // this directory (and any of its sub-directories). Please see:
718 // < http://www.brynosaurus.com/cachedir/ >
719
720 const char cacheSignature[] = "Signature: 8a477f597d28d172789f06886806bc55\n";
721 const char cacheComment[] =
722 "# This file is a cache directory tag created by BZFlag.\n"
723 "# For information about cache directory tags, see:\n"
724 "# http://www.brynosaurus.com/cachedir/\n";
725 std::string cacheTagName = getCacheDirName();
726 cacheTagName += "CACHEDIR.TAG";
727 std::ostream* cacheTag = FILEMGR.createDataOutStream(cacheTagName, true, true);
728 if (cacheTag != NULL) {
729 cacheTag->write(cacheSignature, (std::streamsize)strlen(cacheSignature));
730 cacheTag->write(cacheComment, (std::streamsize)strlen(cacheComment));
731 }
732 delete cacheTag;
733
734 return;
735}
736
737
738void setupBZDB(void) {

Callers 1

initClientFunction · 0.70

Calls 3

getCacheDirNameFunction · 0.85
createDataOutStreamMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected