migrate from std::filesystem::path to io::path (WIP)

This commit is contained in:
MihailRis 2025-01-30 22:23:13 +03:00
parent 1e22882284
commit e0314803c0
72 changed files with 1189 additions and 791 deletions

View file

@ -0,0 +1,21 @@
#include "Device.hpp"
namespace io {
class StdfsDevice : public Device {
public:
StdfsDevice(std::filesystem::path root) : root(std::move(root)) {}
std::filesystem::path resolve(std::string_view path) override;
void write(std::string_view path, const void* data, size_t size) override;
void read(std::string_view path, void* data, size_t size) override;
size_t size(std::string_view path) override;
bool exists(std::string_view path) override;
bool isdir(std::string_view path) override;
bool isfile(std::string_view path) override;
void mkdirs(std::string_view path) override;
bool remove(std::string_view path) override;
uint64_t removeAll(std::string_view path) override;
private:
std::filesystem::path root;
};
}