limits_stop_at¶
limits_stop_at(path, limits)
¶
Check if some of limits stops at given path.
Added in 0.8.0
Parameters:
-
path(PathProtocol) –Path to check.
-
limits(Iterable[BaseFileLimit]) –Limits to test path against.
Returns:
-
bool–Trueif any of limit is reached while handling the path,Falseotherwise.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