ls_mlkit.util.sniffer module

class ls_mlkit.util.sniffer.Sniffer[source]

Bases: object

get_all_by_recursion(directory_path, deep, max_deep)[source]
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 sniff

  • pattern (str) – the pattern to match

  • max_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 sniff

  • pattern (str) – the pattern to match

  • max_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]