MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / PathGenerate

Method PathGenerate

Source/ResourceMan.cpp:283–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283std::string cResourceMan::PathGenerate(const std::string& pFile, eDataType pDataType) const {
284 std::stringstream filePathFinal;
285
286 switch (pDataType) {
287 case eData:
288 filePathFinal << "Data" << gPathSeperator;
289 break;
290
291 case eSave:
292 filePathFinal << "Saves" << gPathSeperator;
293 break;
294
295 case eCampaign:
296 filePathFinal << "Campaigns" << gPathSeperator;
297 break;
298
299 case eTest:
300 filePathFinal << "Tests" << gPathSeperator;
301 break;
302
303 case eScript:
304 filePathFinal << "Scripts" << gPathSeperator;
305 break;
306
307 case eRoot:
308 case eNone:
309 default:
310 break;
311 }
312
313 filePathFinal << pFile;
314
315 return filePathFinal.str();
316}
317
318std::string cResourceMan::FileMD5(const std::string& pFile) {
319 md5_context ctx;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected