| 30 | } |
| 31 | |
| 32 | String 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 | |
| 41 | void File::changeDirectory(const String& dirName) { |
| 42 | if (!SetCurrentDirectoryW(stringToUtf16(dirName).get())) |
nothing calls this directly
no test coverage detected