WSL/SLF GitLab Repository
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
f0230ef0
Commit
f0230ef0
authored
Aug 11, 2015
by
Mathias Bavay
Browse files
Oups, the class prefix was missing...
parent
6e089787
Changes
1
Hide whitespace changes
Inline
Side-by-side
meteoio/plugins/libsmet.cc
View file @
f0230ef0
...
...
@@ -86,25 +86,25 @@ bool SMETCommon::initStaticData()
}
#if defined _WIN32 || defined __MINGW32__
bool
fileExists
(
const
std
::
string
&
filename
)
bool
SMETCommon
::
fileExists
(
const
std
::
string
&
filename
)
{
const
DWORD
attributes
=
GetFileAttributes
(
filename
.
c_str
()
);
if
(
attributes
==
INVALID_FILE_ATTRIBUTES
||
attributes
==
FILE_ATTRIBUTE_VIRTUAL
if
(
attributes
==
INVALID_FILE_ATTRIBUTES
||
attributes
==
FILE_ATTRIBUTE_VIRTUAL
||
attributes
==
FILE_ATTRIBUTE_DIRECTORY
||
attributes
==
FILE_ATTRIBUTE_DEVICE
)
return
false
;
return
true
;
}
#else
bool
fileExists
(
const
std
::
string
&
filename
)
bool
SMETCommon
::
fileExists
(
const
std
::
string
&
filename
)
{
struct
stat
buffer
;
if
((
stat
(
filename
.
c_str
(),
&
buffer
))
!=
0
)
{
//File exists if stat returns 0
return
false
;
}
if
(
S_ISREG
(
buffer
.
st_mode
)
||
S_ISFIFO
(
buffer
.
st_mode
)
||
S_ISLNK
(
buffer
.
st_mode
))
return
true
;
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment