diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/common/String.hpp | 3 | ||||
-rw-r--r-- | include/cru/common/io/Resource.hpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/cru/common/String.hpp b/include/cru/common/String.hpp index 22d68980..c1f957c0 100644 --- a/include/cru/common/String.hpp +++ b/include/cru/common/String.hpp @@ -5,6 +5,7 @@ #include "StringUtil.hpp" #include <double-conversion/double-conversion.h> +#include <filesystem> #include <initializer_list> #include <iterator> #include <string> @@ -50,6 +51,8 @@ class CRU_BASE_API String { return String{from_buffer_tag{}, buffer, size, capacity}; } + static String FromStdPath(const std::filesystem::path& path); + #ifdef CRU_PLATFORM_WINDOWS static String FromUtf16(wchar_t* str) { return String(str); } static String FromUtf16(wchar_t* str, Index size) { diff --git a/include/cru/common/io/Resource.hpp b/include/cru/common/io/Resource.hpp index d1343d8e..4fd00bdd 100644 --- a/include/cru/common/io/Resource.hpp +++ b/include/cru/common/io/Resource.hpp @@ -1,10 +1,8 @@ #pragma once - #include "../Base.hpp" -#include "Stream.hpp" -#include <memory> +#include <filesystem> namespace cru::io { -std::unique_ptr<Stream> CreateStreamFromResourcePath(const String& path); +std::filesystem::path CRU_BASE_API GetResourceDir(); } |