Opens a file for a binary read.
More...
Opens a file for a binary read.
|
| AFileInputStream (const AString &path) |
|
| AFileInputStream (AFileInputStream &&rhs) noexcept |
|
AFileInputStream & | operator= (AFileInputStream &&rhs) noexcept |
|
FILE * | nativeHandle () const |
|
void | seek (std::streamoff offset, Seek dir) noexcept |
|
void | seek (std::streampos pos) noexcept |
|
std::streampos | tell () noexcept |
|
std::size_t | size () noexcept |
|
std::size_t | read (char *dst, size_t size) override |
| Reads up to size bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
size_t | read (std::span< std::byte > destination) |
| Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
void | readExact (char *dst, size_t size) |
| Reads exact size bytes from stream. Blocking (waiting for new data) is allowed. More...
|
|
template<typename T > |
T | deserialize () |
|
template<typename T > |
IInputStream & | operator>> (T &dst) |
|
template<typename T > |
IInputStream & | operator>> (T &&dst) |
|
◆ Seek
Enumerator |
---|
BEGIN | Seek relatively to the begin of file
|
CURRENT | Seek relatively to the current position
|
END | Seek relative to the end of file
|
◆ read()
size_t AFileInputStream::read |
( |
char * |
dst, |
|
|
size_t |
size |
|
) |
| |
|
overridevirtual |
Reads up to size
bytes from stream. Blocking (waiting for new data) is allowed.
- 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.
#include <AUI/IO/AFileInputStream.h>
The documentation for this class was generated from the following files: