ExtSaveData work
This commit is contained in:
@@ -24,6 +24,9 @@ class IOFile {
|
||||
public:
|
||||
IOFile() {}
|
||||
IOFile(FILE* handle) : handle(handle) {}
|
||||
IOFile(const std::filesystem::path& path, const char* permissions = "rb") {
|
||||
open(path, permissions);
|
||||
}
|
||||
|
||||
bool isOpen() {
|
||||
return handle != nullptr;
|
||||
@@ -86,6 +89,10 @@ public:
|
||||
return seek(0, SEEK_SET);
|
||||
}
|
||||
|
||||
FILE* getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
static void setAppDataDir(const char* dir) {
|
||||
if (!dir) Helpers::panic("Failed to set app data directory");
|
||||
appData = std::filesystem::path(dir);
|
||||
|
||||
Reference in New Issue
Block a user