Fsync alternative for windows C ++

Is there an alternative to fsync for windows? (C ++ Builder)

Fsync needs to enable unistd.h and this is only for unix systems

Thanks!

+4
source share
2 answers

From the man page:

fflush () forces all user space to write buffered data for a given data stream or update stream through the stream, the main write function.

The specified write function tells the operating system what the contents of the file should be. At this point, all changes will be stored in the file system caches before they are mapped to disk.

POSIX fsync() . , FlushFileBuffers Windows.

+2

fflush , , .

FlushFileBuffers , Windows.

0

Source: https://habr.com/ru/post/1611665/


All Articles