Salome HOME
Typo-fix by Kunda
[modules/kernel.git] / src / Basics / Basics_DirUtils.cxx
index 22359e8d393f65294e42f3468f6041f389366953..6a52479a136282178d3c43098f5ff822a959070d 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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;
   }