update io::Device::write

This commit is contained in:
MihailRis 2025-02-04 17:38:43 +03:00
parent 3e67d887f4
commit 1c98d6cb37
6 changed files with 50 additions and 12 deletions

View file

@ -1,12 +1,13 @@
#include "Device.hpp"
namespace io {
/// @brief Device based on the standard filesystem
class StdfsDevice : public Device {
public:
StdfsDevice(std::filesystem::path root, bool createDirectory = true);
std::filesystem::path resolve(std::string_view path) override;
void write(std::string_view path, const void* data, size_t size) override;
std::unique_ptr<std::ostream> write(std::string_view path) override;
std::unique_ptr<std::istream> read(std::string_view path) override;
size_t size(std::string_view path) override;
bool exists(std::string_view path) override;