summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qfsfileengine_win.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 86e9bf971d..756e884bd1 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -198,15 +198,25 @@ bool QFSFileEnginePrivate::nativeFlush()
return true;
}
- // Windows native mode; flushing is
- // unnecessary. FlushFileBuffers(), the equivalent of sync() or
- // fsync() on Unix, does a low-level flush to the disk, and we
- // don't expose an API for this.
+ // Windows native mode; flushing is unnecessary.
return true;
}
/*
\internal
+ \since 5.1
+*/
+bool QFSFileEnginePrivate::nativeSyncToDisk()
+{
+ if (fh || fd != -1) {
+ // stdlib / stdio mode. No API available.
+ return false;
+ }
+ return FlushFileBuffers(fileHandle);
+}
+
+/*
+ \internal
*/
qint64 QFSFileEnginePrivate::nativeSize() const
{