summaryrefslogtreecommitdiffstats
path: root/src/common/fs/fs_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/fs/fs_util.h')
-rw-r--r--src/common/fs/fs_util.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h
index 2492a9f94..dbb4f5a9a 100644
--- a/src/common/fs/fs_util.h
+++ b/src/common/fs/fs_util.h
@@ -82,4 +82,24 @@ concept IsChar = std::same_as<T, char>;
*/
[[nodiscard]] std::string PathToUTF8String(const std::filesystem::path& path);
-} // namespace Common::FS
+/**
+ * Fix filename (remove invalid characters)
+ *
+ * @param u8_string dirty encoded filename string
+ *
+ * @returns utf8_string santized filename string
+ *
+ */
+[[nodiscard]] std::u8string U8FilenameSantizer(const std::u8string_view u8filename);
+
+/**
+ * Fix filename (remove invalid characters)
+ *
+ * @param utf8_string dirty encoded filename string
+ *
+ * @returns utf8_string santized filename string
+ *
+ */
+[[nodiscard]] std::string UTF8FilenameSantizer(const std::string_view filename);
+
+} // namespace Common::FS \ No newline at end of file