WASI
WASI copied to clipboard
fsync on directories on Windows
In POSIX circles, which WASI generally tries to follow, there are some use cases for fsyncing a directory, to ensure that a file's directory entry has been written to storage.
However, on Windows, there's FlushFileBuffers for syncing files to storage, but it only works on files. There doesn't appear to be a way to do this for directories. There is some discussion in the FlushFileBuffers documentation about optimizing buffering, but I don't see any documentation about syncing directory entries.
Should Windows implementations of the sync function just silently succeed, indicating that the implementation did the best it could? Or should it unconditionally fail to signal that nothing could be done?