Yields all paths below the current one fil is a filter (glob pattern or callable), if not matching the path will not be yielded, defaulting to None (everything is returned) rec is a filter (glob pattern or callable) that controls whether a node is descended,
(self, fil=None, rec=None, ignore=NeverRaised, bf=False, sort=False)
| 518 | return self.new(basename=self.basename + str(other)) |
| 519 | |
| 520 | def visit(self, fil=None, rec=None, ignore=NeverRaised, bf=False, sort=False): |
| 521 | class="st">"""Yields all paths below the current one |
| 522 | |
| 523 | fil is a filter (glob pattern or callable), if not matching the |
| 524 | path will not be yielded, defaulting to None (everything is |
| 525 | returned) |
| 526 | |
| 527 | rec is a filter (glob pattern or callable) that controls whether |
| 528 | a node is descended, defaulting to None |
| 529 | |
| 530 | ignore is an Exception class that is ignoredwhen calling dirlist() |
| 531 | on any of the paths (by default, all exceptions are reported) |
| 532 | |
| 533 | bf if True will cause a breadthfirst search instead of the |
| 534 | default depthfirst. Default: False |
| 535 | |
| 536 | sort if True will sort entries within each directory level. |
| 537 | class="st">""" |
| 538 | yield from Visitor(fil, rec, ignore, bf, sort).gen(self) |
| 539 | |
| 540 | def _sortlist(self, res, sort): |
| 541 | if sort: |