denigma 4.0.0
Loading...
Searching...
No Matches
denigma::FileRandomAccessReader Class Referencefinal

Random-access reader backed by a filesystem file. More...

#include <random_access_reader.h>

Inheritance diagram for denigma::FileRandomAccessReader:
Collaboration diagram for denigma::FileRandomAccessReader:

Public Member Functions

 FileRandomAccessReader (const std::filesystem::path &path)
 Opens path for random-access reads.
 
std::uint64_t size () const override
 Returns the total readable byte count.
 
std::size_t readAt (std::uint64_t offset, std::span< std::byte > output) const override
 Reads up to output.size() bytes from offset and returns the number of bytes read.
 

Detailed Description

Random-access reader backed by a filesystem file.

Member Function Documentation

◆ readAt()

std::size_t denigma::FileRandomAccessReader::readAt ( std::uint64_t  offset,
std::span< std::byte >  output 
) const
overridevirtual

Reads up to output.size() bytes from offset and returns the number of bytes read.

Implements denigma::IRandomAccessReader.

◆ size()

std::uint64_t denigma::FileRandomAccessReader::size ( ) const
overridevirtual

Returns the total readable byte count.

Implements denigma::IRandomAccessReader.


The documentation for this class was generated from the following file: