DATRW++ library: seismic data I/O with multiple formats

◆ abort_if_exists()

void datrw::abort_if_exists ( const std::string &  filename)

check for existing output fil

aborts, if file with given filename exists

Examples:
writetest.cc.

Definition at line 49 of file datwrite.cc.

References DATRW_assert.

Referenced by main().

50  {
51  std::ifstream file(filename.c_str(),std::ios_base::in);
52  DATRW_assert((!file.good()),"ERROR: file exists!");
53  }
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
Here is the caller graph for this function: