azure-osconfig
azure-osconfig copied to clipboard
[experimental] Add InputStream wrapper for improved guarding of file read operations.
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
- [x] I have read the contribution guidelines.
- [x] I added unit-tests to validate my changes. All unit tests are passing.
- [x] I have merged the latest
devbranch prior to this PR submission. - [x] I ran pre-commit on my changes prior to this PR submission.
- [x] I submitted this PR against the
devbranch.
Test Results
64 files 64 suites 58m 15s ⏱️ 8 tests 8 ✅ 0 💤 0 ❌ 256 runs 234 ✅ 22 💤 0 ❌
Results for commit 5d7fd1ce.
:recycle: This comment has been updated with latest results.