-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_stream: Implement StdFileReader::ConservativeLimit
The ConservativeLimit method returns an estimate of how much data is available to be read or written in a pw::stream. The default implementation returns a very large value ("unlimited"). This commit implements a file-specific implementation for StdFileReader. It determines the size of the file (and thus how much data is left to read) by seeking to the end and getting the current file position. This makes the ConservativeReadLimit method much more useful for users of the class. Change-Id: I55b2518d3dc17ca8c4f98847dc7c3557eb9fda74 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/106130 Commit-Queue: Auto-Submit <[email protected]> Reviewed-by: Wyatt Hepler <[email protected]> Pigweed-Auto-Submit: Eli Lipsitz <[email protected]>
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters