mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
use NEL CFile function for file test
This commit is contained in:
parent
afbe00fc39
commit
b1fb181b56
1 changed files with 1 additions and 6 deletions
|
@ -150,12 +150,7 @@ void outString (const string &sText)
|
|||
// ---------------------------------------------------------------------------
|
||||
bool fileExist (const std::string &sFileName)
|
||||
{
|
||||
#ifdef NL_OS_WINDOWS
|
||||
return (GetFileAttributes(sFileName.c_str()) != INVALID_FILE_ATTRIBUTES);
|
||||
#else // NL_OS_WINDOWS
|
||||
struct stat buf;
|
||||
return stat (sFileName.c_str (), &buf) == 0;
|
||||
#endif // NL_OS_WINDOWS
|
||||
return NLMISC::CFile::isExists(sFileName) ;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue