overwrites QFile to only generate a file if its new version differs from an existing one, it creates a temporary file with ",new" added to the file name; additionally it records all file names that it touches; this is not a complete implementation - just enough for woc; it assumes that files are opened to be (re)created
More...
#include <mfile.h>
|
| | MFile (QString name, QObject *parent=0) |
| | creates a new file (tentatively) with the given name (temporarily with ",new" appended) More...
|
| |
| | MFile (QObject *parent=0) |
| | creates a file object More...
|
| |
| | ~MFile () |
| | implicitly closes the file More...
|
| |
| virtual void | close () |
| | compares the old (if it exists) and new version of the file and overwrites the old one if there are differences More...
|
| |
| virtual bool | open (QIODevice::OpenMode m=QIODevice::WriteOnly) |
| | opens the file, WriteOnly is assumed as mode More...
|
| |
| QString | fileName () const |
| | returns the name of the file (without ",new") More...
|
| |
| void | setFileName (QString n) |
| | sets the file name for the file to be written; must be called before it is opened More...
|
| |
|
| static bool | touchedFile (QString) |
| | returns true if that file name has been touched yet More...
|
| |
|
| static QMap< QString, QStringList > | touched |
| |
overwrites QFile to only generate a file if its new version differs from an existing one, it creates a temporary file with ",new" added to the file name; additionally it records all file names that it touches; this is not a complete implementation - just enough for woc; it assumes that files are opened to be (re)created
| MFile::MFile |
( |
QString |
name, |
|
|
QObject * |
parent = 0 |
|
) |
| |
creates a new file (tentatively) with the given name (temporarily with ",new" appended)
| MFile::MFile |
( |
QObject * |
parent = 0 | ) |
|
implicitly closes the file
compares the old (if it exists) and new version of the file and overwrites the old one if there are differences
| QString MFile::fileName |
( |
| ) |
const |
|
inline |
returns the name of the file (without ",new")
| bool MFile::open |
( |
QIODevice::OpenMode |
m = QIODevice::WriteOnly | ) |
|
|
virtual |
opens the file, WriteOnly is assumed as mode
| void MFile::setFileName |
( |
QString |
n | ) |
|
sets the file name for the file to be written; must be called before it is opened
| bool MFile::touchedFile |
( |
QString |
name | ) |
|
|
static |
returns true if that file name has been touched yet
| QMap< QString, QStringList > MFile::touched |
|
staticprivate |
The documentation for this class was generated from the following files: