Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Win32: implement further UTF8 support
[xestiacalendar/.git] / source / common / file.cpp
index 076752d..9e4e448 100644 (file)
@@ -22,7 +22,7 @@ using namespace std;
 
 bool FileExists(std::string filename){
        
-#if defined (__WIN32__)
+#if defined (WIN32)
 
 #else 
 
@@ -36,4 +36,24 @@ bool FileExists(std::string filename){
        
        return true;
        
+}
+
+bool FileExists(std::wstring filename) {
+
+#if defined (WIN32)
+
+       return PathFileExists(filename.c_str());
+
+#else 
+
+       struct stat bufferData;
+
+       if (stat(filename.c_str(), &bufferData) == -1) {
+               return false;
+       }
+
+#endif
+
+       return true;
+
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy