2 ms·
Phew. I've primarily used Windows. Not that any of the posix programs I've been exposed to have done the dir sync though. For cross-platform stuff I've mainly
by magicalhippo 2y ago
Phew. I've primarily used Windows. Not that any of the posix programs I've been exposed to have done the dir sync though.
For cross-platform stuff I've mainly used Boost, which I assumed handled such details.
- guappa 2y agoI'm sure it does not. Also these things are needed very very rarely (which is why few even know about the issue) and are not good for performance and battery life.
- account42 2y agoMore specifically, these things are for trying to improve the behavior on unclean system shutdown (e.g. power loss) which is inherently chaotic and unless all parts (most critically the disk and its controller) are well behaved you don't have any real guarantees anyway. Windows also doesn't guarantee that data is written to disk by the time WriteFile/CloseHandle returns, the Windows version of fsync is FlushFileBuffers.