1 /** @file fs_windows.cpp  Windows-specific file system operations.
2  *
3  * @authors Copyright (c) 2014-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
4  *
5  * @par License
6  * GPL: http://www.gnu.org/licenses/gpl.html
7  *
8  * <small>This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by the
10  * Free Software Foundation; either version 2 of the License, or (at your
11  * option) any later version. This program is distributed in the hope that it
12  * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details. You should have received a copy of the GNU
15  * General Public License along with this program; if not, see:
16  * http://www.gnu.org/licenses</small>
17  */
18 
19 #include "doomsday/filesys/fs_windows.h"
20 #include <stdio.h>
21 #include <de/String>
22 
23 using namespace de;
24 
FS_Win32_fopen(char const * filenameUtf8,char const * mode)25 FILE *FS_Win32_fopen(char const *filenameUtf8, char const *mode)
26 {
27     return _wfopen(String(filenameUtf8).toStdWString().c_str(),
28                    String(mode).toStdWString().c_str());
29 }
30 
FS_Win32_access(char const * pathUtf8,int mode)31 int FS_Win32_access(char const *pathUtf8, int mode)
32 {
33     return _waccess(String(pathUtf8).toStdWString().c_str(), mode);
34 }
35 
FS_Win32_mkdir(char const * dirnameUtf8)36 int FS_Win32_mkdir(char const *dirnameUtf8)
37 {
38     return _wmkdir(String(dirnameUtf8).toStdWString().c_str());
39 }
40