aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-25 18:39:14 +0800
committercrupest <crupest@outlook.com>2022-01-25 18:39:14 +0800
commitd3aa43d9ea0dfc32935767cf60a89af2736dc339 (patch)
treee8cf043ac6d9a2e6ce038ad6b1f57079834ef129 /include
parent71c01a175a939d1a519ab235fdfdeec1101f8b84 (diff)
downloadcru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.tar.gz
cru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.tar.bz2
cru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.zip
...
Diffstat (limited to 'include')
-rw-r--r--include/cru/common/String.hpp3
-rw-r--r--include/cru/common/io/Resource.hpp6
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();
}