update io::SubDevice constructor

This commit is contained in:
MihailRis 2025-02-04 13:08:42 +03:00
parent e4c33e539e
commit bced20be1f
2 changed files with 21 additions and 2 deletions

View file

@ -28,8 +28,11 @@ namespace io {
class SubDevice : public Device {
public:
SubDevice(std::shared_ptr<Device> parent, const std::string& path)
: parent(std::move(parent)), root(path) {}
SubDevice(
std::shared_ptr<Device> parent,
const std::string& path,
bool createDirectory = true
);
std::filesystem::path resolve(std::string_view path) override {
return parent->resolve((root / path).pathPart());