Skip to content

[experimental] Add InputStream wrapper for improved guarding of file read operations.#1205

Draft
robertwoj-microsoft wants to merge 7 commits intodevfrom
robertwoj/TechDebt/FileStream
Draft

[experimental] Add InputStream wrapper for improved guarding of file read operations.#1205
robertwoj-microsoft wants to merge 7 commits intodevfrom
robertwoj/TechDebt/FileStream

Conversation

@robertwoj-microsoft
Copy link
Contributor

@robertwoj-microsoft robertwoj-microsoft commented Nov 14, 2025

Description

Introduce a wrapper class for std::ifstream. Goals:

  • Add file read limits - currently the limit is soft and allows the last line to exceed the lmiit
  • Add Result<> wrappers where applicable for improved error handling
  • Add iterator and range classes to support range-based loops.
  • Mockable filenames

planned to add if necessary:

  • byte-by-byte read iterator and range
  • full-file read (wrap in a function returning Result)

Checklist

  • I have read the contribution guidelines.
  • I added unit-tests to validate my changes. All unit tests are passing.
  • I have merged the latest dev branch prior to this PR submission.
  • I ran pre-commit on my changes prior to this PR submission.
  • I submitted this PR against the dev branch.

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

Test Results

 64 files   64 suites   58m 15s ⏱️
  8 tests   8 ✅  0 💤 0 ❌
256 runs  234 ✅ 22 💤 0 ❌

Results for commit 5d7fd1c.

♻️ This comment has been updated with latest results.

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.

2 participants