1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-03 18:07:53 +01:00

Refactor platform calls to File

This commit is contained in:
Ted John
2016-12-05 16:58:07 +00:00
parent 921c7596df
commit 2c0786eb24
3 changed files with 22 additions and 9 deletions

View File

@@ -21,8 +21,23 @@
#include "FileStream.hpp"
#include "String.hpp"
extern "C"
{
#include "../platform/platform.h"
}
namespace File
{
bool Copy(const utf8 * srcPath, const utf8 * dstPath, bool overwrite)
{
return platform_file_copy(srcPath, dstPath, overwrite);
}
bool Delete(const utf8 * path)
{
return platform_file_delete(path);
}
void * ReadAllBytes(const utf8 * path, size_t * length)
{
void * result = nullptr;

View File

@@ -20,5 +20,7 @@
namespace File
{
bool Copy(const utf8 * srcPath, const utf8 * dstPath, bool overwrite);
bool Delete(const utf8 * path);
void * ReadAllBytes(const utf8 * path, size_t * length);
}