limits_stop_at¶
limits_stop_at(path, limits)
¶
Check if some of limits stops at given path.
.. versionadded:: 0.8.0
Parameters:
-
path(:obj:onetl.base.path_protocol.PathProtocol) –Path to check.
-
limits(iterable[:obj:(BaseFileLimit)]) –Limits to test path against.
Returns:
-
``True`` if any of limit is reached while handling the path, ``False`` otherwise.– -
If no limits are passed, returns ``False``.–
Examples:
>>> from onetl.file.limit import MaxFilesCount, limits_stop_at
>>> from onetl.impl import LocalPath
>>> limits = [MaxFilesCount(2)]
>>> limits_stop_at(LocalPath("/path/to/file1.csv"), limits)
False
>>> limits_stop_at(LocalPath("/path/to/file2.csv"), limits)
False
>>> limits_stop_at(LocalPath("/path/to/file3.csv"), limits)
True