carb::extras::convertWindowsToCarbonitePath

Defined in carb/extras/WindowsPath.h

inline std::string carb::extras::convertWindowsToCarbonitePath(const std::wstring &pathW)

(Windows only) Converts Windows system file path to a UTF-8 file path.

Backslashes are replaced with slashes and the long path prefix is removed if present.

Errors

Accessible via carb::ErrorApi

  • Note: Error state is not cleared on success

  • omni::core::kResultFail - UTF-8 to wide conversion failed

Note

Use of this function is discouraged. Use carb::filesystem::IFileSystem for filesystem needs.

Parameters

pathW – Input string to convert, in Unicode (Windows native) encoding.

Returns

UTF-8 encoded file path or empty string if conversion cannot be performed.