| 380 | |
| 381 | template <typename T> |
| 382 | inline void DoRecurse(T& w, const TString& off) const { |
| 383 | { |
| 384 | TFileList fl; |
| 385 | |
| 386 | const char* name; |
| 387 | const TString p = Path + off; |
| 388 | |
| 389 | fl.Fill(p, true); |
| 390 | |
| 391 | while ((name = fl.Next())) { |
| 392 | const TString fname = p + name; |
| 393 | const TString rname = Prefix + off + name; |
| 394 | |
| 395 | Append(w, fname, rname); |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | if (Recursive) { |
| 400 | TDirsList dl; |
| 401 | |
| 402 | const char* name; |
| 403 | const TString p = Path + off; |
| 404 | |
| 405 | dl.Fill(p, true); |
| 406 | |
| 407 | while ((name = dl.Next())) { |
| 408 | if (strcmp(name, ".") && strcmp(name, "..")) { |
| 409 | DoRecurse(w, off + name + "/"); |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | }; |
| 415 | } |
| 416 | |