#include <ksavefile.h>
Public Methods | |
| KSaveFile (const QString &filename, int mode=0666) | |
| ~KSaveFile () | |
| int | status () const |
| QString | name () const |
| int | handle () const |
| FILE * | fstream () |
| QFile * | file () |
| QTextStream * | textStream () |
| QDataStream * | dataStream () |
| void | abort () |
| bool | close () |
b) Some error occured, no changes have been written whatsoever and the old file is still in place.
Definition at line 41 of file ksavefile.h.
|
||||||||||||
|
Creates a new KSaveFile with the given file name.
|
|
|
The destructor closes the file. |
|
|
Aborts the write operation and removes any intermediate files This implies a close. |
|
|
Closes the file and makes the changes definitive. Returns 'true' is successful, or 'false' if an error has occured. See status() for details about errors.
|
|
|
A QDataStream* open for writing to the file.
Definition at line 114 of file ksavefile.h. References KTempFile::dataStream(). |
|
|
A QFile* open for writing to the file.
Definition at line 98 of file ksavefile.h. References KTempFile::file(). |
|
|
A FILE* stream open for writing to the file.
Definition at line 90 of file ksavefile.h. References KTempFile::fstream(). |
|
|
An integer file descriptor open for writing to the file.
Definition at line 82 of file ksavefile.h. References KTempFile::handle(). |
|
|
The name of the file as passed to the constructor.
|
|
|
Returns the status of the file based on errno. (see errno.h) 0 means OK. You should check the status after object creation to check whether a file could be created in the first place. You may check the status after closing the file to verify that the file has indeed been written correctly.
Definition at line 67 of file ksavefile.h. References KTempFile::status(). |
|
|
A QTextStream* open for writing to the file.
Definition at line 106 of file ksavefile.h. References KTempFile::textStream(). |
1.2.18