#pragma once #include namespace fs { namespace detail { TL_DECLARE_STRING_LITERAL(EmptyRootTag, ""); } // windows path system template template T WindowsSystemCustom::format_absolute(const tl::vector& members) { return tl::simple_path_system::template format_absolute(members); } template void WindowsSystemCustom::parse_absolute(tl::vector& o_elements, const char* path, size_t size) { // On windows, the drive letter case is undefined. To avoid issues (hashing, etc), we always convert the drive letter to uppercase tl::simple_path_system::parse_absolute(o_elements, path, size); if (!o_elements.empty()) { tl::string& str = o_elements.front(); if (str.length() == 2 && str[1] == ':') { char strUp[2]; strUp[0] = tl::ascii::toupper(str[0]); strUp[1] = ':'; str = tl::string(strUp, 2); } } } template bool WindowsSystemCustom::match(const char* path, size_t size) { return size >= 2 && std::isalpha(path[0], std::locale()) && path[1] == ':'; } template bool WindowsSystemCustom::validate_abs_path(const tl::vector& members) { return !members.empty() && match(members[0].c_str(), members[0].size()); } ////////////////////////////////////////////////////////////////////////// }