mutapath.MutaPath.walk
- MutaPath.walk(match=None, errors='strict')[source]
Iterator over files and subdirs, recursively.
The iterator yields Path objects naming each child item of this directory and its descendants. This requires that
D.isdir()
.This performs a depth-first traversal of the directory tree. Each directory is returned just before all its children.
The errors= keyword argument controls behavior when an error occurs. The default is
'strict'
, which causes an exception. Other allowed values are'warn'
(which reports the error viawarnings.warn()
), and'ignore'
. errors may also be an arbitrary callable taking a msg parameter.