Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
file.cpp/.h: wstring version of FileExists for Win32 only
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 4 Feb 2018 05:38:23 +0000 (05:38 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 4 Feb 2018 05:38:23 +0000 (05:38 +0000)
source/common/file.cpp
source/common/file.h

index 9e4e448..515ceb9 100644 (file)
@@ -38,22 +38,12 @@ bool FileExists(std::string filename){
        
 }
 
-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;
-       }
+bool FileExists(std::wstring filename) {
 
-#endif
+       return PathFileExists(filename.c_str());
 
-       return true;
+}
 
-}
\ No newline at end of file
+#endif
\ No newline at end of file
index 69303d7..65410fa 100644 (file)
@@ -29,6 +29,8 @@
 #endif
 
 bool FileExists(std::string filename);
+#if defined(WIN32)
 bool FileExists(std::wstring filename);
+#endif
 
 #endif
\ 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