26 #include <tdetempfile.h>
28 class KSaveFilePrivate;
49 KSaveFile(
const TQString &filename,
int mode = 0666 );
69 {
return mTempFile.status(); }
76 TQString name()
const;
84 {
return mTempFile.handle(); }
92 {
return mTempFile.fstream(); }
100 {
return mTempFile.file(); }
108 {
return mTempFile.textStream(); }
116 {
return mTempFile.dataStream(); }
141 static bool backupFile(
const TQString& filename,
142 const TQString& backupDir = TQString::null,
143 const TQString& backupExtension = TQString::fromLatin1(
"~" ) );
The KSaveFile class has been made to write out changes to an existing file atomically.
int status() const
Returns the status of the file based on errno.
FILE * fstream()
A FILE* stream open for writing to the file.
TQFile * file()
A TQFile* open for writing to the file.
TQDataStream * dataStream()
A TQDataStream* open for writing to the file.
TQTextStream * textStream()
A TQTextStream* open for writing to the file.
int handle() const
An integer file descriptor open for writing to the file.
The KTempFile class creates and opens a unique file for temporary use.