mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-06 22:49:43 +00:00
refactor: consolidate file I/O into IPlatformFileIO, delete PortableFileIO and PathHelper
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "console_helpers/StringHelpers.h"
|
||||
#include <filesystem>
|
||||
|
||||
#include "java/File.h"
|
||||
|
||||
namespace {
|
||||
@@ -52,7 +53,7 @@ FileInputStream::FileInputStream(const File& file) : m_fileHandle(nullptr) {
|
||||
#if defined(_WIN32)
|
||||
m_fileHandle = _wfopen(file.getPath().c_str(), L"rb");
|
||||
#else
|
||||
const std::string nativePath = wstringtofilename(file.getPath());
|
||||
const std::string nativePath = std::filesystem::path(file.getPath()).string();
|
||||
m_fileHandle = std::fopen(nativePath.c_str(), "rb");
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user