pyufunc.show_dir_in_tree#

pyufunc.show_dir_in_tree(dir_name, pattern='**/*', *, show_all=False, max_level=-1, **kwargs)#

List contents of directories in a tree-like format.

Parameters:
  • dir_name (str | Path) – Directory to display.

  • kwargs – Arguments for root = Path(*args, **kwargs)

  • pattern (str) – Arguments for root.glob(pattern)

  • show_all (bool) – Whether not to ignore entries starting with .

  • max_level (int) – Max display depth of the directory tree.

Location:

pyufunc/util_pathio/_path.py

Examples

>>> import pyufunc as pf
>>> pf.show_dir_in_tree('./', '*.py', True, 2)
Returns:

None