Tracked by #375.
Problem
Current file APIs are easy to misuse. fs_read_all accepts a path, destination pointer, and capacity, while io_read accepts a file descriptor. Existing examples do not make that boundary obvious.
Scope
Add small runnable examples and Wave corpus fixtures for:
- Opening and closing a file with std::fs::file.
- Reading a path into a caller-owned byte array with fs_read_all.
- Reading an already-open descriptor with std::io::fd::io_read.
- Handling negative return values.
- Reporting the number of bytes read without treating it as a string length.
Use only current APIs. API renaming belongs to #375 and its design follow-ups.
Completion criteria
Tracked by #375.
Problem
Current file APIs are easy to misuse. fs_read_all accepts a path, destination pointer, and capacity, while io_read accepts a file descriptor. Existing examples do not make that boundary obvious.
Scope
Add small runnable examples and Wave corpus fixtures for:
Use only current APIs. API renaming belongs to #375 and its design follow-ups.
Completion criteria