From dba7bcd489b9802c3d25e3e8183ef7991af301b8 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 1 Jun 2021 09:22:18 -0400 Subject: common: fs: fs_util: Move PathToUTF8String to fs_util --- src/common/fs/fs_util.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/common/fs/fs_util.h') diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h index de452c0f6..ec9950ee7 100644 --- a/src/common/fs/fs_util.h +++ b/src/common/fs/fs_util.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include #include #include @@ -45,4 +46,13 @@ concept IsChar = std::same_as; */ [[nodiscard]] std::string ToUTF8String(std::u8string_view u8_string); +/** + * Converts a filesystem path to a UTF-8 encoded std::string. + * + * @param path Filesystem path + * + * @returns UTF-8 encoded std::string. + */ +[[nodiscard]] std::string PathToUTF8String(const std::filesystem::path& path); + } // namespace Common::FS -- cgit v1.2.3