4#ifndef TRAM_SDK_PLATFORM_FILE_H
5#define TRAM_SDK_PLATFORM_FILE_H
33 void write (
const char* data,
size_t length);
36 void* file_handle =
nullptr;
size_t length
Definition: file.h:24
bool is_open()
Checks if file was loaded into memory.
Definition: file.cpp:56
~FileReader()
Deletes the loaded file from memory.
Definition: file.cpp:48
FileReader(const char *path, FileSource source=SOURCE_ANY)
Loads a file into memory.
Definition: file.cpp:16
const char * contents
Definition: file.h:23
FileWriter(const char *path, FileSource source=SOURCE_ANY)
Opens a file for writing.
Definition: file.cpp:65
bool is_open()
Checks if a file was opened for writing.
Definition: file.cpp:94
void write(const char *data, size_t length)
Writes to a file.
Definition: file.cpp:89
~FileWriter()
Closes the file for writing.
Definition: file.cpp:77
FileSource
Definition: file.h:11
@ SOURCE_DISK
Definition: file.h:13
@ SOURCE_ANY
Definition: file.h:12