[haiku-development] Re: Peek function in BPositionIO or BDataIO?

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 22 Jun 2016 00:45:23 +0200

On Tue, Jun 21, 2016 at 9:37 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:

On Mon, Jun 20, 2016 at 8:44 PM, Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
wrote:
Hello,
I'm considering adding a function that work just like a Read but without
changing the current position of the file. Reading data and then seeking
back is a common situation so that having a function that just reads the
current data without altering the position makes sense. It's of interest
for
codecs but will come handy also when using it in a multithread
environment
making less trickier to synchronize the calls.

Don't BPositionIO::{Read,Write}At already do this?


From the BDataIO point of view there's not a way to do that. But, yes, it's
not something to care about as it seems in the end we are always forced to
use something derived from BPositionIO.

Other related posts: