feat(storage): implement Windows directory synchronization (FlushFileBuffers)
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 502
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 715
Description
## Summary
On Windows, \syncDirectory()\ is a no-op, meaning directory-level durability guarantees are weaker than on POSIX. Newly created/renamed/linked/removed entries may not survive power loss.
## Current State
- **\docs/windows-support.md:193-199\**: Documents the gap
- **No implementation** exists for Windows directory synchronization
## Proposed Solution
1. Implement Windows directory synchronization using \FlushFileBuffers\ on directory handles
2. Use \CreateFile\ with \FILE_FLAG_WRITE_THROUGH\ for directory handles
3. Call \FlushFileBuffers\ after directory operations
4. Document the durability boundary for Windows
## Acceptance Criteria
- [ ] \syncDirectory()\ works on Windows
- [ ] Directory operations are durable across power loss
- [ ] Performance impact is acceptable
- [ ] Documentation updated
## Labels
enhancement, help wanted
Contributor guide
Assessment
This issue has not been assessed yet.