zcollection.fs_utils.fs_walk#

zcollection.fs_utils.fs_walk(fs, path, sort=False)[source]#

Return the list of files and directories in a directory.

Parameters:
  • fs (AbstractFileSystem) – file system object

  • path (str) – path to the directory

  • sort (bool) – if True, the list of files and directories is sorted alphabetically

Returns:

Iterator of (path, directories, files).

Return type:

Iterator[tuple[str, list[str], list[str]]]