MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / runPath

Method runPath

source/src/tools/process.h:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 {
9 public:
10 static std::wstring runPath()
11 {
12 size_t size = GetCurrentDirectoryW(0, nullptr);
13 if (size)
14 {
15 std::wstring result(size, 0);
16 GetCurrentDirectoryW(size, &result.front());
17 return result.c_str();
18 }
19 return std::wstring();
20 }
21 static bool RunPath(std::wstring path = L"") { if (path.size()) return SetCurrentDirectoryW(path.c_str()); else return SetCurrentDirectoryW(Path::RemoveFile(exePath()).c_str()); }
22 static std::wstring exePath() { PATH_BUFFERW(path); GetModuleFileNameW(0, path, PATH_BUFFER_SIZE); return path; }
23 static std::wstring exeName() { return Path::GetFile(exePath()); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected