6namespace pixelbullet::filesystem
8[[nodiscard]]
inline std::filesystem::path to_native_file_io_path(
const std::filesystem::path& path)
11 if (!path.is_absolute())
16 std::wstring native_path = path.native();
17 std::replace(native_path.begin(), native_path.end(), L
'/', L
'\\');
18 if (native_path.rfind(L
"\\\\?\\", 0u) == 0u)
22 if (native_path.rfind(L
"\\\\", 0u) == 0u)
24 return std::filesystem::path(L
"\\\\?\\UNC" + native_path.substr(1u));
26 return std::filesystem::path(L
"\\\\?\\" + native_path);