WebAssembly / WebAssembly/WASI
fsync on directories on Windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WASI sync function semantics and the linked FlushFileBuffers documentation, focusing on directory support on Windows. Compare the possible silent-success and unconditional-failure behaviors and record the chosen specification outcome as done.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100