Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
file.cpp/.h: wstring version of FileExists for Win32 only
[xestiacalendar/.git]
/
source
/
common
/
file.cpp
diff --git
a/source/common/file.cpp
b/source/common/file.cpp
index
783defc
..
515ceb9
100644
(file)
--- a/
source/common/file.cpp
+++ b/
source/common/file.cpp
@@
-20,15
+20,15
@@
using namespace std;
using namespace std;
-bool FileExists(std::string
F
ilename){
+bool FileExists(std::string
f
ilename){
-#if defined (
__WIN32__
)
+#if defined (
WIN32
)
#else
#else
- struct stat
Buff
Data;
+ struct stat
buffer
Data;
- if (stat(
Filename.c_str(), &Buff
Data) == -1){
+ if (stat(
filename.c_str(), &buffer
Data) == -1){
return false;
}
return false;
}
@@
-36,4
+36,14
@@
bool FileExists(std::string Filename){
return true;
return true;
-}
\ No newline at end of file
+}
+
+#if defined (WIN32)
+
+bool FileExists(std::wstring filename) {
+
+ return PathFileExists(filename.c_str());
+
+}
+
+#endif
\ No newline at end of file
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy