| 13 | namespace fsbridge { |
| 14 | |
| 15 | FILE *fopen(const fs::path& p, const char *mode) |
| 16 | { |
| 17 | #ifndef WIN32 |
| 18 | return ::fopen(p.string().c_str(), mode); |
| 19 | #else |
| 20 | std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t> utf8_cvt; |
| 21 | return ::_wfopen(p.wstring().c_str(), utf8_cvt.from_bytes(mode).c_str()); |
| 22 | #endif |
| 23 | } |
| 24 | |
| 25 | #ifndef WIN32 |
| 26 |
no outgoing calls