persistent/util.hpp
// verify the existence of a regular file
verify the existence of a regular file
verify the existence of a regular file
inline bool checkRegularFile(const std::string & file)
noexcept(false) {
  struct stat sb;
  bool bRet = true;
  if (stat(file.c_str(),&sb) == 0) {
    if(! S_ISREG(sb.st_mode)) {
      throw PERSIST_EXP_INV_FILE;
    }
  } else {
    bRet = false;
  }
  return bRet;
}
inline bool checkRegularFile ( const std :: string & file ) noexcept ( false ) { struct stat sb ; bool bRet = true ; if ( stat ( file . c_str ( ) , & sb ) == 0 ) { if ( ! S_ISREG ( sb . st_mode ) ) { throw PERSIST_EXP_INV_FILE ; } } else { bRet = false ; } return bRet ; }
verify the existence of a regular file
verify the existence of a regular file