X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBasics%2FBasics_DirUtils.cxx;h=6a52479a136282178d3c43098f5ff822a959070d;hb=d1151f956567da46ee95cfd65502b55416145b66;hp=22359e8d393f65294e42f3468f6041f389366953;hpb=288dc1c84630e521220d796b7c88c518f34856d5;p=modules%2Fkernel.git diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx index 22359e8d3..6a52479a1 100644 --- a/src/Basics/Basics_DirUtils.cxx +++ b/src/Basics/Basics_DirUtils.cxx @@ -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 # include #else +#include +#define F_OK 0 +#define access _access # include # include #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; }