Opens a file for a binary read.
#include <AUI/IO/AFileInputStream.h>
|
| AFileInputStream (const AString &path) |
|
| AFileInputStream (AFileInputStream &&rhs) noexcept |
|
AFileInputStream & | operator= (AFileInputStream &&rhs) noexcept |
|
FILE * | nativeHandle () const |
|
void | seek (std::streamoff offset, ASeekDir seekDir) noexcept override |
| change reading position, a way of changing depends on seekDir parameter
|
|
std::streampos | tell () noexcept override |
| return current reading position
|
|
bool | isEof () override |
| returns true if end of stream has been reached
|
|
std::size_t | read (char *dst, size_t size) override |
| Reads up to size bytes from stream. Blocking (waiting for new data) is allowed.
|
|
size_t | fileSize () |
| return size of the stream
|
|
size_t | read (std::span< std::byte > destination) |
| Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed.
|
|
void | readExact (char *dst, size_t size) |
| Reads exact size bytes from stream. Blocking (waiting for new data) is allowed.
|
|
template<typename T> |
T | deserialize () |
|
template<typename T> |
IInputStream & | operator>> (T &dst) |
|
template<typename T> |
IInputStream & | operator>> (T &&dst) |
|
◆ isEof()#
bool AFileInputStream::isEof |
( |
| ) |
|
|
overridevirtual |
◆ read()#
std::size_t AFileInputStream::read |
( |
char * | dst, |
|
|
size_t | size ) |
|
overridevirtual |
- Sneaky exceptions
- An implementation can throw any exception that subclasses AIOException.
- Parameters
-
dst | destination buffer |
size | destination buffer's size. > 0 |
- Returns
- number of read bytes (including 0)
Implements IInputStream.
◆ seek()#
void AFileInputStream::seek |
( |
std::streamoff | offset, |
|
|
ASeekDir | seekDir ) |
|
overridevirtualnoexcept |
◆ tell()#
std::streampos AFileInputStream::tell |
( |
| ) |
|
|
nodiscardoverridevirtualnoexcept |