MCPcopy Create free account
hub / github.com/comaps/comaps / GetUserWritableDir

Function GetUserWritableDir

libs/platform/platform_win.cpp:20–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include <sys/types.h>
19
20static bool GetUserWritableDir(std::string & outDir)
21{
22 char pathBuf[MAX_PATH] = {0};
23 if (SUCCEEDED(::SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, pathBuf)))
24 {
25 outDir = pathBuf;
26 ::CreateDirectoryA(outDir.c_str(), NULL);
27 outDir += "\\CoMaps\\";
28 ::CreateDirectoryA(outDir.c_str(), NULL);
29 return true;
30 }
31 return false;
32}
33
34/// @return Full path to the executable file
35static bool GetPathToBinary(std::string & outPath)

Callers 1

PlatformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected