48 SafeFileIO(
const char*,
bool locked=
false);
51 bool open(
bool forread,
bool ignorelock=
false);
57 { doClose( keeplock,
false ); }
59 {
return doClose( keeplock,
true ); }
61 const char*
fileName()
const {
return filenm_.buf(); }
88 bool doClose(
bool,
bool);
90 bool haveLock()
const;
91 bool waitForLock()
const;
#define mExpClass(module)
Definition: commondefs.h:160
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
const char * str() const
Definition: odstring.h:48
bool removebakonsuccess_
default=false
Definition: safefileio.h:65
const BufferString newfnm_
Definition: safefileio.h:81
od_stream * strm_
Definition: safefileio.h:83
OD base class for stream read/write.
Definition: od_stream.h:53
BufferString errmsg_
Definition: safefileio.h:82
bool closeSuccess(bool keeplock=false)
Definition: safefileio.h:58
double lockwaitincr_
default=0.5 (seconds)
Definition: safefileio.h:67
OD class for stream read.
Definition: od_istream.h:24
const bool locked_
Definition: safefileio.h:77
bool usebakwhenmissing_
default=true
Definition: safefileio.h:64
bool allowlockremove_
Definition: safefileio.h:68
const char * fileName() const
Definition: safefileio.h:61
const char * errMsg() const
Definition: safefileio.h:52
Protects file IO when you can't afford to have partly written things after write errors or have a fil...
Definition: safefileio.h:44
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
const BufferString lockfnm_
Definition: safefileio.h:79
BufferString errmsg_
Definition: horizontracker.h:119
int lockretries_
default=10
Definition: safefileio.h:66
void closeFail(bool keeplock=false)
Definition: safefileio.h:56
const BufferString filenm_
Definition: safefileio.h:78
const BufferString bakfnm_
Definition: safefileio.h:80