ls_mlkit.util.sniffer module¶
- class ls_mlkit.util.sniffer.Sniffer[source]¶
Bases:
object- sniff_file(directory_path, pattern, max_deep=-1) list[str][source]¶
Get all files in the directory_path that match the pattern
- Parameters:
directory_path (
str) – the path of the directory to sniffpattern (
str) – the pattern to matchmax_deep (
int, optional) – the maximum depth to sniff. Defaults to -1.
- Returns:
the full path of the files that match the pattern
- Return type:
list[str]
- sniff_file_by_path_pattern(directory_path, pattern, max_deep=-1) list[str][source]¶
Get all files in the directory_path that match the pattern
- Parameters:
directory_path (
str) – the path of the directory to sniffpattern (
str) – the pattern to matchmax_deep (
int, optional) – the maximum depth to sniff. Defaults to -1.
- Returns:
the full path of the files that match the pattern
- Return type:
list[str]