NDEVR
API Documentation
TAR::FileReaderfinal

Reader implementation for uncompressed files using std::ifstream. More...

Inheritance diagram for TAR::FileReader:
[legend]
Collaboration diagram for TAR::FileReader:
[legend]

Public Member Functions

 FileReader (const std::string &p)
 Constructs a FileReader and opens the specified file in binary mode.
bool eof () const override
 Checks whether the end of the file has been reached.
bool read_exact (u8 *dst, size_t n) override
 Reads exactly n bytes from the file into the destination buffer.

Public Attributes

std::ifstream f
 The underlying file input stream.

Detailed Description

Reader implementation for uncompressed files using std::ifstream.


Definition at line 49 of file TarReader.h.

Constructor & Destructor Documentation

◆ FileReader()

TAR::FileReader::FileReader ( const std::string & p)
inlineexplicit

Constructs a FileReader and opens the specified file in binary mode.

Parameters
[in]pFile path to open.

Definition at line 56 of file TarReader.h.

References f.

Member Function Documentation

◆ eof()

bool TAR::FileReader::eof ( ) const
inlineoverridevirtual

Checks whether the end of the file has been reached.

Returns
True if at end of file, false otherwise.

Implements TAR::Reader.

Definition at line 73 of file TarReader.h.

References f.

◆ read_exact()

bool TAR::FileReader::read_exact ( u8 * dst,
size_t n )
inlineoverridevirtual

Reads exactly n bytes from the file into the destination buffer.

Parameters
[in]dstPointer to the destination buffer.
[in]nNumber of bytes to read.
Returns
True if all bytes were successfully read, false otherwise.

Implements TAR::Reader.

Definition at line 64 of file TarReader.h.

References f.


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