You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fs.walk.Walker can take filter and exclude parameters to include/exclude certain file base names, as well as filter_dirs and exclude_dirs parameters to include/exclude entire directories.
My suggestion is to introduce two new parameters, filter_glob and exclude_glob, to work on arbitrary path objects. This would make working with filters mixed of both directories and files much easier.
For example, consider a file system with three files:
foo/a.py
foo/b.py
bar/a.py
Walking over all files except for foo/a.py is, afaik, impossible with the current Walker functionality. My suggestion would allow for:
fs.walk.Walker
can takefilter
andexclude
parameters to include/exclude certain file base names, as well asfilter_dirs
andexclude_dirs
parameters to include/exclude entire directories.My suggestion is to introduce two new parameters,
filter_glob
andexclude_glob
, to work on arbitrary path objects. This would make working with filters mixed of both directories and files much easier.For example, consider a file system with three files:
Walking over all files except for
foo/a.py
is, afaik, impossible with the currentWalker
functionality. My suggestion would allow for:The text was updated successfully, but these errors were encountered: