iter_files

function of dascore.utils.misc source

iter_files(
    paths: str | collections.abc.Iterable[str, collections.abc.Iterable[str]] ,
    ext: str | None[str, None] = None,
    mtime: float | None[float, None] = None,
    skip_hidden: bool = True,
)-> ‘Iterable[str]’

Use os.scan dir to iter files, optionally only for those with given extension (ext) or modified times after mtime.

Parameters

Parameter Description
paths The path to the base directory to traverse. Can also use a collection
of paths.
ext : str or None The extensions to map.
mtime : int or float Time stamp indicating the minimum mtime.
skip_hidden : bool If True skip files or folders (they begin with a ‘.’)

Yields

Paths, as strings, meeting requirements.