From d3aa43d9ea0dfc32935767cf60a89af2736dc339 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 25 Jan 2022 18:39:14 +0800 Subject: ... --- include/cru/common/String.hpp | 3 +++ include/cru/common/io/Resource.hpp | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') 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 +#include #include #include #include @@ -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 +#include namespace cru::io { -std::unique_ptr CreateStreamFromResourcePath(const String& path); +std::filesystem::path CRU_BASE_API GetResourceDir(); } -- cgit v1.2.3