首页 Windows 替代Windows的Fsync c

替代Windows的Fsync c

是否有替代 Windows的fsync? (C建造者) Fsync需要包含unistd.h,它仅适用于unix系统 谢谢! 从手册页: fflush() forces a write of all user-space buffered data for the given output or update stream via the stream’s underlying write func

是否有替代
Windows的fsync? (C建造者)

Fsync需要包含unistd.h,它仅适用于unix系统

谢谢!

从手册页:

fflush() forces a write of all user-space
buffered data for the given output or update stream via the stream’s
underlying write function.

提到的write函数告诉操作系统文件的内容应该是什么.此时,所有更改将在实际提交到磁盘之前保存在文件系统缓存中.

POSIX函数fsync()告诉操作系统将其缓存中的所有更改同步到磁盘.正如其他人所说,你可以在Windows平台上使用FlushFileBuffers.

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/zhonghe/fwq/windows/20200721/6426.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部