diff options
Diffstat (limited to 'src/support/path.h')
-rw-r--r-- | src/support/path.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/support/path.h b/src/support/path.h index 78e85ca5c..8383bc53e 100644 --- a/src/support/path.h +++ b/src/support/path.h @@ -24,8 +24,22 @@ #include <cstdlib> #include <string> +#if defined(_WIN32) && !defined(__MINGW32__) +#define USE_WSTRING_PATHS 1 +#endif + namespace wasm::Path { +#ifdef USE_WSTRING_PATHS +using PathString = std::wstring; +std::wstring string_to_wstring(const std::string& s); +std::string wstring_to_string(const std::wstring& s); +#else +using PathString = std::string; +#endif + +PathString to_path(const std::string& s); + char getPathSeparator(); std::string getDirName(const std::string& path); std::string getBaseName(const std::string& path); |