Skip to content

docs: add file I/O examples - #387

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
Saket7002:feat/377-file-io-examples
Aug 29, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
Saket7002:feat/377-file-io-examples

Conversation

@Saket7002

Copy link
Copy Markdown
Contributor

Add runnable file I/O examples

Summary

Adds focused examples demonstrating the distinction between path-based and descriptor-based file I/O.

Changes

  • Add a runnable file I/O example.
  • Demonstrate opening and closing file descriptors.
  • Demonstrate fs_read_all with caller-owned byte storage.
  • Demonstrate io_read with an already-open file descriptor.
  • Check returned byte counts and negative error results.
  • Document that fs_read_all does not allocate or return str.
  • Add a Linux-hosted test case covering the file I/O behavior.

Closes #377.

@LunaStev

Copy link
Copy Markdown
Member

Could you update this? #387 (comment)

@LunaStev
LunaStev requested review from LunaStev and removed request for LunaStev August 29, 2026 01:29
@LunaStev

Copy link
Copy Markdown
Member

LGTM overall. Just one small nit.

@LunaStev
LunaStev merged commit c714e6c into wavefnd:master Aug 29, 2026
6 checks passed
@LunaStev LunaStev mentioned this pull request Sep 30, 2026
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.

Add runnable examples for path-based and descriptor-based file I/O

2 participants