list_or_glob#

caput.pipeline.tasklib.io.list_or_glob(files)[source]#

Take in a list of lists/glob patterns of filenames.

Parameters:
filesPathLike | Sequence[PathLike]

A path or glob pattern (e.g. /my/data/*.h5) or a list of those

Returns:
file_listlist[PathLike]

The input file list. Any glob patterns will be flattened to file path string lists.

Raises:
CaputConfigError

If files has the wrong type or if it refers to a file that doesn’t exist.