| 6 | { |
| 7 | |
| 8 | FILE * fopen( const std::filesystem::path & filename, const char * mode ) |
| 9 | { |
| 10 | #ifdef _WIN32 |
| 11 | std::wstring wmode( mode, mode + std::strlen( mode ) ); |
| 12 | return _wfopen( filename.wstring().c_str(), wmode.c_str() ); |
| 13 | #else |
| 14 | // Linux |
| 15 | return std::fopen( utf8string( filename ).c_str(), mode ); |
| 16 | #endif |
| 17 | } |
| 18 | |
| 19 | FILE * File::open( const std::filesystem::path & filename, const char * mode ) |
| 20 | { |