mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
add io::directory_iterator
This commit is contained in:
parent
c3066eebd3
commit
347d76870a
13 changed files with 182 additions and 64 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue