|
| bool | open (const std::string &file) |
| | Constructs the stream and opens a file.
|
| bool | isOpen () const |
|
void | close () |
| | Closes the file.
|
| size_t | read (void *buffer, size_t size) override |
| | Reads from the input stream.
|
| size_t | seek (size_t position) override |
| | Changes the current position the stream is reading.
|
| size_t | tell () override |
| size_t | getSize () override |
|
|
static constexpr size_t | FILE_NOT_FOUND = 0 |
|
static constexpr size_t | INVALID_FILE_SIZE = ~(0) |
|
static constexpr size_t | INVALID_FILE_POSITION = ~(0) |
◆ getSize()
| size_t mce::FileInputStream::getSize |
( |
| ) |
|
|
overridevirtual |
◆ isOpen()
| bool mce::FileInputStream::isOpen |
( |
| ) |
const |
- Returns
- True if the file was successfully opened
◆ open()
| bool mce::FileInputStream::open |
( |
const std::string & | file | ) |
|
Constructs the stream and opens a file.
- Parameters
-
| file | The path (absolute or relative) to the file |
Opens a file to read from
- Parameters
-
| file | The path (absolute or relative) to the file |
◆ read()
| size_t mce::FileInputStream::read |
( |
void * | buffer, |
|
|
size_t | size ) |
|
overridevirtual |
Reads from the input stream.
- Parameters
-
| buffer | The buffer to read the bytes into |
| size | The amount of bytes to read |
- Returns
- The amount of bytes written
Implements mce::InputStream.
◆ seek()
| size_t mce::FileInputStream::seek |
( |
size_t | position | ) |
|
|
overridevirtual |
Changes the current position the stream is reading.
- Parameters
-
| position | The position to seek the input stream to |
- Returns
- The position the input stream is at now
Implements mce::InputStream.
◆ tell()
| size_t mce::FileInputStream::tell |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: