Base interface¶
Bases: ABC
Base file filter interface.
Filters used by several onETL components, including :ref:file-downloader and :ref:file-mover,
to determine if a file should be handled or not.
All filters are stateless.
.. versionadded:: 0.8.0
match(path)
abstractmethod
¶
Returns True if path is matching the filter, False otherwise
.. versionadded:: 0.8.0
Examples:
>>> from onetl.impl import LocalPath
>>> filter.match(LocalPath("/path/to/file.csv"))
True
>>> filter.match(LocalPath("/path/to/excluded.csv"))
False
>>> filter.match(LocalPath("/path/to/file.csv"))
True