mirror of
https://github.com/mikage-emu/mikage-dev.git
synced 2025-03-10 03:14:48 +01:00
PXI: Switch from boost::filesystem to std::filesystem
This commit is contained in:
parent
a2e39d48bc
commit
68644fe6d5
2 changed files with 9 additions and 9 deletions
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include <platform/pxi.hpp>
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace HLE {
|
||||
|
@ -133,8 +133,8 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
const boost::filesystem::path path;
|
||||
boost::filesystem::fstream stream;
|
||||
const std::filesystem::path path;
|
||||
std::fstream stream;
|
||||
|
||||
Policy policy;
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include "pxi_fs_file_buffer_emu.hpp"
|
||||
|
||||
#include <framework/exceptions.hpp>
|
||||
#include <fmt/std.h>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <framework/exceptions.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
@ -25,7 +25,7 @@ HostFile::HostFile(std::string_view path, Policy policy) : path(std::begin(path)
|
|||
ResultAnd<> HostFile::Open(FileContext& context, OpenFlags flags) {
|
||||
context.logger.info("Attempting to open {} (create={})", path, flags.create);
|
||||
|
||||
if (!flags.create && !boost::filesystem::exists(path)) {
|
||||
if (!flags.create && !std::filesystem::exists(path)) {
|
||||
return std::make_tuple(-1);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ void HostFile::Close(/*FakeThread& thread*/) {
|
|||
ResultAnd<uint64_t> HostFile::GetSize(FileContext& context) {
|
||||
context.logger.info("Attempting to get size of file {}", path);
|
||||
|
||||
uint64_t size = boost::filesystem::file_size(path);
|
||||
uint64_t size = std::filesystem::file_size(path);
|
||||
|
||||
return std::make_tuple(OS::RESULT_OK, size);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ ResultAnd<> HostFile::SetSize(FakeThread& thread, uint64_t size) {
|
|||
|
||||
// TODO: Does this zero-fill the file as expected?
|
||||
// TODO: Expected by whom? If these are not the 3DS semantics, we still would want to have deterministic buffer contents here!
|
||||
boost::filesystem::resize_file(path, size);
|
||||
std::filesystem::resize_file(path, size);
|
||||
|
||||
return std::make_tuple(OS::RESULT_OK);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue