diff options
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/include/zencore/filesystem.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zencore/include/zencore/filesystem.h b/zencore/include/zencore/filesystem.h index 68b55f86e..574567445 100644 --- a/zencore/include/zencore/filesystem.h +++ b/zencore/include/zencore/filesystem.h @@ -83,6 +83,15 @@ public: void operator /= (const wchar_t* Rhs) { AppendSeparator(); Super::Append(Rhs); } std::filesystem::path ToPath() const { return std::filesystem::path(Super::ToView()); } + std::string ToUtf8() const + { +#if ZEN_PLATFORM_WINDOWS + WideToUtf8(Super::ToView()); +#else + return std::string(Super::ToView()); +#endif + } + void AppendSeparator() { if ( |