MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / currentDirectory

Method currentDirectory

source/core/StarFile_windows.cpp:32–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32String File::currentDirectory() {
33 WCHAR buffer[MAX_PATH];
34 size_t len = GetCurrentDirectoryW(MAX_PATH, buffer);
35 if (len == 0)
36 throw IOException("GetCurrentDirectory failed");
37
38 return utf16ToString(buffer);
39}
40
41void File::changeDirectory(const String& dirName) {
42 if (!SetCurrentDirectoryW(stringToUtf16(dirName).get()))

Callers

nothing calls this directly

Calls 1

utf16ToStringFunction · 0.85

Tested by

no test coverage detected