Skip to content

memfs: Document MemFile write/close/sync semantics#10

Merged
mojatter merged 1 commit into
mainfrom
docs/memfs-close-sync
Apr 6, 2026
Merged

memfs: Document MemFile write/close/sync semantics#10
mojatter merged 1 commit into
mainfrom
docs/memfs-close-sync

Conversation

@mojatter
Copy link
Copy Markdown
Owner

@mojatter mojatter commented Apr 6, 2026

MemFile buffers writes locally and only publishes them on Close, while osfs makes writes visible immediately. Sync is a no-op on memfs and in particular does NOT publish buffered bytes. These differences can trip up callers porting code between backends, so spell them out on the MemFile type doc and on each of Write, Close, and Sync.

MemFile buffers writes locally and only publishes them on Close, while
osfs makes writes visible immediately. Sync is a no-op on memfs and in
particular does NOT publish buffered bytes. These differences can trip
up callers porting code between backends, so spell them out on the
MemFile type doc and on each of Write, Close, and Sync.
@mojatter mojatter merged commit 1cf2c86 into main Apr 6, 2026
1 check passed
@mojatter mojatter deleted the docs/memfs-close-sync branch April 6, 2026 05:02
mojatter added a commit that referenced this pull request Apr 7, 2026
The original v0.5.0 entry attributed PRs #6-#10 (Rename/Sync, lint CI,
memfs Sub fix, store perf, memfs docs) to v0.5.0, but those were
already shipped in v0.4.1. Rewrite the entry to reflect what is
actually new since v0.4.1: README additions, CHANGELOG itself, the
Go matrix and -race CI, the Go 1.24 minimum, and the NewOSFS
deprecation timeline.
@mojatter mojatter mentioned this pull request Apr 7, 2026
2 tasks
mojatter added a commit that referenced this pull request Apr 7, 2026
The original v0.5.0 entry attributed PRs #6-#10 (Rename/Sync, lint CI,
memfs Sub fix, store perf, memfs docs) to v0.5.0, but those were
already shipped in v0.4.1. Rewrite the entry to reflect what is
actually new since v0.4.1: README additions, CHANGELOG itself, the
Go matrix and -race CI, the Go 1.24 minimum, and the NewOSFS
deprecation timeline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant