| 231 | } |
| 232 | |
| 233 | bool Path::startsWith(const Path& otherPath) const { |
| 234 | auto otherSize = otherPath._components.size(); |
| 235 | if (otherSize > _components.size()) { |
| 236 | return false; |
| 237 | } |
| 238 | |
| 239 | for (size_t i = 0; i < otherSize; i++) { |
| 240 | if (_components[i] != otherPath._components[i]) { |
| 241 | return false; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | return true; |
| 246 | } |
| 247 | |
| 248 | const std::vector<std::string>& Path::getComponents() const { |
| 249 | return _components; |