Skip to content

Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt - #162875

Open
json420 wants to merge 18 commits into
rust-lang:mainfrom
json420:seek_read_exact
Open

json420 wants to merge 18 commits into
rust-lang:mainfrom
json420:seek_read_exact

Conversation

@json420

@json420 json420 commented Sep 16, 2026

Copy link
Copy Markdown

Tracking issue: #162868

This adds .seek_read_exact() to std::os::windows::fs::FileExt, an exact port of read_exact_at() for std::os::unix::fs::FileExt.

And it adds .seek_write_all() to std::os::windows::fs::FileExt, an exact port of write_all_at() for std::os::unix::fs::FileExt.

Finally, it adds six tests.

First there is a smoke test for seek_read_exact(), seek_write_all(), an exact port of the test for the .seek_read(), .seek_write() methods. This is to make sure we are getting the same pass-through behavior through the lens of established tests.

Then there are five tests for the windows::fs::FileExt trait itself, covering all seek_read_exact(), seek_write_all() corner cases except io::ErrorKind::Interrupted (advise welcome on that one). These tests use mock implementations of the traits seek_read() and seek_write() methods.

No LLMs were used in writing this PR.

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 16, 2026
@rustbot

rustbot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @clarfonthey (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

Comment thread library/std/src/fs/tests.rs
@clarfonthey

Copy link
Copy Markdown
Contributor

LGTM minus test splitting.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@json420
json420 marked this pull request as draft September 17, 2026 21:50
@json420
json420 marked this pull request as ready for review September 18, 2026 19:11
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 18, 2026
@json420

json420 commented Sep 18, 2026

Copy link
Copy Markdown
Author

@rustbot ready

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

Thank you!

@rust-bors

rust-bors Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6ac2b72 has been approved by clarfonthey

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2026
@json420

json420 commented Sep 18, 2026

Copy link
Copy Markdown
Author

@clarfonthey No, thank you! Contributing to Rust is, like, a wildly pleasant experience for a first timer! Seriously. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants