feat: move std::filesystem::path related function to independent namespace.

- create FsPathPatch namespace to hold std::filesystem::path related functions.
- add corresponding testbench code for it.
This commit is contained in:
2024-06-15 17:57:33 +08:00
parent e7b13768ec
commit 5481898ad9
7 changed files with 143 additions and 61 deletions

View File

@ -34,15 +34,4 @@ namespace YYCC::IOHelper {
*/
FILE* UTF8FOpen(const char* u8_filepath, const char* u8_mode);
/**
* @brief Build std::filesystem::path from UTF8 string.
* @param[in] u8_path UTF8 path string for building this std::filesystem::path.
* @return std::filesystem::path instance.
* @exception std::invalid_argument Fail to parse given UTF8 string (maybe invalid?).
* @remarks
* This function is suit for Windows.
* On other platforms, it will simply call the constructor of std::filesystem::path.
*/
std::filesystem::path UTF8Path(const char* u8_path);
}