Salome HOME
Typo-fix by Kunda
[modules/kernel.git] / src / Basics / Basics_DirUtils.cxx
index 2c7f3338ce643605f1b4b69831f734b646986713..6a52479a136282178d3c43098f5ff822a959070d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
 //
 
 //  File   : Basics_DirUtils.cxx
-//  Autor  : Alexander A. BORODIN
+//  Author  : Alexander A. BORODIN
 //  Module : SALOME
 //
 #include "Basics_DirUtils.hxx"
@@ -31,6 +31,9 @@
 # include <dirent.h>
 # include <unistd.h>
 #else
+#include <io.h>
+#define F_OK 0
+#define access _access
 # include <windows.h>
 # include <time.h>
 #endif
@@ -160,16 +163,8 @@ namespace Kernel_Utils
   //============================================================================ 
   bool IsExists(const std::string& thePath) 
   {
-#ifdef WIN32 
-    if (  GetFileAttributes (  thePath.c_str()  ) == 0xFFFFFFFF  ) { 
-      if (  GetLastError () == ERROR_FILE_NOT_FOUND  ) {
-        return false;
-      }
-    }
-#else 
     int status = access ( thePath.c_str() , F_OK ); 
     if (status != 0) return false;
-#endif
     return true;
   }