MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetWritePath

Function GetWritePath

Source/Internal/filesystem.cpp:531–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531string GetWritePath(const ModID& id) {
532#if defined(OGDA) || defined(OG_WORKER)
533 return string(write_path);
534#else
535 if (id.Valid()) {
536 if (id != CoreGameModID) {
537 ModInstance* modi = ModLoading::Instance().GetMod(id);
538 if (modi) {
539 return AssemblePath(string(write_path), "ModsDataCache", string(modi->id)) + "/";
540 } else {
541 LOGF << "Got valid mod id to non existant mod" << endl;
542 }
543 }
544 } else {
545 LOGF << "Got invalid mod id" << endl;
546 }
547 return string(write_path);
548#endif
549}
550
551void GetWritePath(const ModID& id, char* buf, size_t len) {
552 // Fastpath to make the coredump routine a little more robust.

Callers 15

InitMethod · 0.85
InitMethod · 0.85
FinalizeMethod · 0.85
CalcNavMeshMethod · 0.85
SaveMethod · 0.85
GetTempDDSPathFunction · 0.85
SimplifyModelFunction · 0.85
createShaderMethod · 0.85
LoadDataMethod · 0.85
ReloadInternalMethod · 0.85
loadTextureMethod · 0.85
loadArraySliceMethod · 0.85

Calls 5

AssemblePathFunction · 0.85
strscpyFunction · 0.85
GetModMethod · 0.80
ValidMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected