| 181 | } |
| 182 | |
| 183 | std::shared_ptr<FilesystemNode> Find(const Path& path) const override |
| 184 | { |
| 185 | if (path.empty()) |
| 186 | return _root; |
| 187 | |
| 188 | auto node = _root; |
| 189 | for (const auto& element : path) |
| 190 | { |
| 191 | try |
| 192 | { |
| 193 | node = node->children.at(element); |
| 194 | } |
| 195 | catch (std::out_of_range& e) |
| 196 | { |
| 197 | return nullptr; |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | return node; |
| 202 | } |
| 203 | |
| 204 | std::shared_ptr<FilesystemNode> Find( |
| 205 | const wxDataViewItem& item) const override |
no test coverage detected