#include <file.h>
◆ FileReader()
Loads a file into memory.
Use FileReader::is_open() to check if the file was successfully loaded. If it was, then you can access the contents through the FileReader::contents pointer and get the length of the file from FileReader::length.
- Parameters
-
path | Path to the file. |
source | Source from which the file will be loaded. |
◆ ~FileReader()
tram::FileReader::~FileReader |
( |
| ) |
|
Deletes the loaded file from memory.
This will free the memory pointed to by FileReader::contents, so if you need anything from there, you'll need to copy it out before you close the file.
◆ is_open()
bool tram::FileReader::is_open |
( |
| ) |
|
Checks if file was loaded into memory.
◆ contents
const char* tram::FileReader::contents = nullptr |
◆ length
size_t tram::FileReader::length = 0 |
The documentation for this class was generated from the following files:
- C:/Users/Poga/Desktop/painis/tram-sdk/src/platform/file.h
- C:/Users/Poga/Desktop/painis/tram-sdk/src/platform/file.cpp