get_files#

mbgdml.utils.get_files(path, expression, recursive=True)[source]#

Returns paths to all files in a given directory that matches a provided expression in the file name.

Parameters:
  • path (str) – Specifies the directory to search.

  • expression (str) – Expression to be tested against all file names in path.

  • recursive (bool, optional) – Recursively find all files in all subdirectories.

Returns:

All absolute paths to files matching the provided expression.

Return type:

list [str]