*Not documented*
def visit(self, fil=None, rec=None, ignore=_dummyclass):
origin: PathBase
where:
exceptions that might appear during execution:
function source:
def visit(self, fil=None, rec=None, ignore=_dummyclass):
if isinstance(fil, str):
fil = fnmatch(fil)
if rec:
if isinstance(rec, str):
rec = fnmatch(fil)
elif not callable(rec):
rec = lambda x: True
reclist = [self]
while reclist:
current = reclist.pop(0)
try:
dirlist = current.listdir()
except ignore:
return
for p in dirlist:
if fil is None or fil(p):
yield p
if p.check(dir=1) and (rec is None or rec(p)):
reclist.append(p)
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/fscommon.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/fscommon.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py