diff options
Diffstat (limited to 'src/corelib/io/qabstractfileengine.cpp')
-rw-r--r-- | src/corelib/io/qabstractfileengine.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp index 2d9cb85d9f..9cdbbbbb25 100644 --- a/src/corelib/io/qabstractfileengine.cpp +++ b/src/corelib/io/qabstractfileengine.cpp @@ -400,6 +400,19 @@ bool QAbstractFileEngine::close() } /*! + \since 5.1 + + Flushes and syncs the file to disk. + + Returns true if successful; otherwise returns false. + The default implementation always returns false. +*/ +bool QAbstractFileEngine::syncToDisk() +{ + return false; +} + +/*! Flushes the open file, returning true if successful; otherwise returns false. @@ -496,6 +509,24 @@ bool QAbstractFileEngine::rename(const QString &newName) } /*! + \since 5.1 + + Requests that the file be renamed to \a newName in the file + system. If the new name already exists, it must be overwritten. + If the operation succeeds, returns true; otherwise returns + false. + + This virtual function must be reimplemented by all subclasses. + + \sa setFileName() + */ +bool QAbstractFileEngine::renameOverwrite(const QString &newName) +{ + Q_UNUSED(newName); + return false; +} + +/*! Creates a link from the file currently specified by fileName() to \a newName. What a link is depends on the underlying filesystem (be it a shortcut on Windows or a symbolic link on Unix). Returns |