[roll pigweed] 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.

Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/106130

https://pigweed.googlesource.com/pigweed/pigweed
pigweed Rolled-Commits: 26e210529ec4d39..3bac75d77b9b492
Roller-URL: https://ci.chromium.org/b/8805741363000674001
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ie186da8bec42db805875892404cfdb513bcf55ad
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/zephyr-integration/+/106556
Bot-Commit: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
1 file changed
tree: cf345f0b7b2b3778dc6fbcb22cbe2a1bf557fa07
  1. .gitmodules
  2. test.sh