| 309 | } |
| 310 | |
| 311 | bool TFsPath::Contains(const TString& component) const { |
| 312 | if (!IsDefined()) { |
| 313 | return false; |
| 314 | } |
| 315 | |
| 316 | TFsPath path = *this; |
| 317 | while (path.Parent() != path) { |
| 318 | if (path.GetName() == component) { |
| 319 | return true; |
| 320 | } |
| 321 | |
| 322 | path = path.Parent(); |
| 323 | } |
| 324 | |
| 325 | return false; |
| 326 | } |
| 327 | |
| 328 | void TFsPath::List(TVector<TFsPath>& files) const { |
| 329 | TVector<TString> names; |