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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user