File: fileutils.cpp

package info (click to toggle)
js8call 2.5.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,720 kB
  • sloc: cpp: 562,655; sh: 898; python: 132; ansic: 102; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 237 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#include "fileutils.h"

void flushFileBuffer(const QFile &f) {
#ifdef Q_OS_WIN
    FlushFileBuffers(reinterpret_cast<HANDLE>(f.handle()));
#elif _POSIX_SYNCHRONIZED_IO > 0
    fdatasync(f.handle());
#else
    fsync(f.handle());
#endif
}