// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: fileutl.cc,v 1.35 2001/02/20 07:03:17 jgg Exp $
+// $Id: fileutl.cc,v 1.36 2001/03/03 22:36:20 tausq Exp $
/* ######################################################################
File Utilities
case WriteAny:
iFd = open(FileName.c_str(),O_RDWR | O_CREAT,Perms);
break;
+
+ case WriteTemp:
+ unlink(Filename.c_str());
+ iFd = open(FileName.c_str(),O_RDWR | O_CREATE | O_EXCL,Perms);
+ break;
}
if (iFd < 0)
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: fileutl.h,v 1.23 2001/02/20 07:03:17 jgg Exp $
+// $Id: fileutl.h,v 1.24 2001/03/03 22:36:20 tausq Exp $
/* ######################################################################
File Utilities
string FileName;
public:
- enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny};
+ enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp};
bool Read(void *To,unsigned long Size,bool AllowEof = false);
bool Write(const void *From,unsigned long Size);