diff options
| author | Martin Ridgers <[email protected]> | 2021-10-20 13:14:52 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-10-20 13:14:52 +0200 |
| commit | 4184dcb513762579da4e1065f27ed743f417010a (patch) | |
| tree | cb8f3dca3355c997e5d5781667549c2ba832e14e /zencore/include | |
| parent | Use the non-throwing version of std::fs::create_directories() (diff) | |
| download | zen-4184dcb513762579da4e1065f27ed743f417010a.tar.xz zen-4184dcb513762579da4e1065f27ed743f417010a.zip | |
Added a ToUtf8() to ExtPathBuilder
Diffstat (limited to 'zencore/include')
| -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 ( |