walk_names#

barecat.Index.walk_names(rootitem, bufsize=32)[source]#

Walk over the directory tree starting from a directory.

Parameters:
  • rootitem (Union[barecat.core.types.BarecatDirInfo, str]) – Directory info object or path of the root directory.

  • bufsize (int) – Buffer size for fetching rows.

Returns:

An iterator over tuples of directory paths, subdirectory names, and file names.

The tuples are in the format (dirpath, subdirs, files), where
  • dirpath is the path of the directory.

  • subdirs is a list of subdirectory names.

  • files is a list of file names.

Return type:

Iterable[tuple[str, list[str], list[str]]]