carb::extras::getWindowsCanonicalPath

Defined in carb/extras/WindowsPath.h

inline std::wstring carb::extras::getWindowsCanonicalPath(const std::wstring &pathW)

(Windows only) Converts Windows path string into a canonical form.

Errors

Accessible via carb::ErrorApi

  • Note: Error state is not cleared on success

  • omni::core::kResultFail - An error occurred

Note

This uses Windows platform functions to canonicalize the path and is fairly costly.

Parameters

pathW – Windows system file path, in Unicode (Windows native) encoding.

Returns

The canonical form of the input path. If an error occurs, pathW is returned without modifications. In order to determine if an error occurred, use carb::ErrorApi. Since error state is not cleared on success, clear the error state before calling this function if you wish to make sure that it succeeds.