
    ^h                    @    d dl mZ d dlZd dlZd dlZdd	Zd
 fddZdS )    )annotationsNpathpathlib.Path | strsuffixstrreturnboolc                    t          | t                    st          |           } |                                                     |                                          S )zA
    Returns whether `path` ends in `suffix`, ignoring case.
    )
isinstancer   casefoldendswith)r   r   s     \/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/onnxruntime/tools/file_utils.pypath_match_suffix_ignore_caser   
   sG     dC   4yy==??##FOO$5$5666    c                    dS )NT )_s    r   <lambda>r      s    gk r   file_or_dir_path	predicate%typing.Callable[[pathlib.Path], bool]list[pathlib.Path]c                8   t          | t          j                  st          j        |           } g dfd}|                                 rAt	          j        |           D ]+\  }}}|D ]"}t          j        ||          } ||           #,n ||            S )a`  
    Gets the files in `file_or_dir_path` satisfying `predicate`.
    If `file_or_dir_path` is a file, the single file is considered. Otherwise, all files in the directory are
    considered.
    :param file_or_dir_path: Path to a file or directory.
    :param predicate: Predicate to determine if a file is included.
    :return: A list of files.
    	file_pathpathlib.Pathc                L     |           r                     |            d S d S )N)append)r   r   selected_filess    r   process_filez,files_from_file_or_dir.<locals>.process_file#   s9    9Y 	-!!),,,,,	- 	-r   )r   r   )r   pathlibPathis_diroswalk)	r   r   r   rootr   filesfiler   r   s	    `      @r   files_from_file_or_dirr(      s     &55 :"<(899N- - - - - - -    ' g&677 	( 	(ND!U ( (#Lt44	Y''''(	(
 	%&&&r   )r   r   r   r   r   r	   )r   r   r   r   r   r   )
__future__r   r#   r    typingr   r(   r   r   r   <module>r+      su    # " " " " " 				  7 7 7 7 ^l]k      r   