| 76 | int depth = 10, bool include_prefix = true) noexcept; |
| 77 | DFHACK_EXPORT std::filesystem::path canonicalize(std::filesystem::path p) noexcept; |
| 78 | inline std::string as_string(const std::filesystem::path path) noexcept |
| 79 | { |
| 80 | // this just mashes the utf-8 into a std::string without any conversion |
| 81 | // this is largely because we use utf-8 everywhere internally as much as we can |
| 82 | // but we should ultimately convert to using u8strings for strings that are utf-8 |
| 83 | // and use a different string type for strings encoded in cp437 or in the locale codepage |
| 84 | std::u8string pstr = path.generic_u8string(); |
| 85 | return std::string((char*)pstr.c_str()); |
| 86 | |
| 87 | } |
| 88 | DFHACK_EXPORT std::filesystem::path getInstallDir() noexcept; |
| 89 | DFHACK_EXPORT std::filesystem::path getBaseDir() noexcept; |
| 90 |
no test coverage detected