add io::directory_iterator
This commit is contained in:
@@ -23,6 +23,7 @@ namespace io {
|
||||
virtual void mkdirs(std::string_view path) = 0;
|
||||
virtual bool remove(std::string_view path) = 0;
|
||||
virtual uint64_t removeAll(std::string_view path) = 0;
|
||||
virtual std::unique_ptr<PathsGenerator> list(std::string_view path) = 0;
|
||||
};
|
||||
|
||||
class SubDevice : public Device {
|
||||
@@ -69,6 +70,10 @@ namespace io {
|
||||
uint64_t removeAll(std::string_view path) override {
|
||||
return parent->removeAll((root / path).pathPart());
|
||||
}
|
||||
|
||||
std::unique_ptr<PathsGenerator> list(std::string_view path) override {
|
||||
return parent->list((root / path).pathPart());
|
||||
}
|
||||
private:
|
||||
std::shared_ptr<Device> parent;
|
||||
path root;
|
||||
|
||||
Reference in New Issue
Block a user