Added getAllPaths() method to get combined results from stacked adapters.
This commit is contained in:
@@ -84,8 +84,15 @@ public:
|
||||
[[nodiscard]] virtual FileInfo getFileInfo(const fs::path& file) = 0;
|
||||
[[nodiscard]] virtual Optional<fs::path> getNativePath(const fs::path& /* file */) { return NULL_OPTIONAL; }
|
||||
[[nodiscard]] virtual StreamError open(const fs::path& path, FileOpenMode mode, std::unique_ptr<Stream>& outStream) = 0;
|
||||
virtual void getAllPaths(const fs::path& path, std::vector<PathReference>& outPaths) { outPaths.push_back(getPath(path)); }
|
||||
|
||||
[[nodiscard]] PathReference getPath(fs::path path) MIJIN_NOEXCEPT { return PathReference(this, std::move(path)); }
|
||||
[[nodiscard]] std::vector<PathReference> getAllPaths(const fs::path& path)
|
||||
{
|
||||
std::vector<PathReference> paths;
|
||||
getAllPaths(path, paths);
|
||||
return paths;
|
||||
}
|
||||
};
|
||||
|
||||
class OSFileSystemAdapter : public FileSystemAdapter
|
||||
|
||||
Reference in New Issue
Block a user