FileFinder#

class polpo.preprocessing.path.FileFinder(data_dir=None, rules=(), warn=True)[source]#

Bases: PreprocessingStep

Find files given rules.

Parameters:
  • data_dir (str) – Searching directory.

  • rules (list[FileRule]) – Rules to filter files with.

  • warn (bool) – Whether to warn if can’t find file.

apply(data=None)[source]#

Apply step.

Parameters:

data_dir (str) – Searching directory.

Returns:

list[str] or str