Back to index

salome-kernel  6.5.0
Functions
SALOMEDS_Tool.cxx File Reference
#include "SALOMEDS_Tool.hxx"
#include "utilities.h"
#include "Basics_DirUtils.hxx"
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <SALOMEconfig.h>

Go to the source code of this file.

Functions

bool Exists (const std::string thePath)

Function Documentation

bool Exists ( const std::string  thePath)

Definition at line 52 of file SALOMEDS_Tool.cxx.

{
#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;
}