improvement: refactor readFile by Smjert · Pull Request #8410 · osquery/osquery
- Simplify readFile interface to only support reading full files - Remove the choice of reading in a blocking way, since we want to prevent hanging - Remove the dry run read, since it was not useful - Split the implementation between two overloads, where one supports returning the whole file contents in one go, while the other calls back a predicate everytime some data is read, up to a fixed block size (as with the previous implementation)
Smjert
marked this pull request as ready for review
Smjert
deleted the
stefano/improvement/readfile-nonblock
branch
zwass
mentioned this pull request
zwass added a commit that referenced this pull request
Jun 3, 2025This file contains hidden or 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