
     Ng                         d dl Z d dlZd dlZdej        ej        ef         dedefdZd fdej        ej        ef         dej        ej        gef         dej	        ej                 fd	Z
dS )
    Npathsuffixreturnc                     t          | t                    st          |           } |                                                     |                                          S )zA
    Returns whether `path` ends in `suffix`, ignoring case.
    )
isinstancestrcasefoldendswith)r   r   s     X/var/www/html/ai-engine/env/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    tx r   file_or_dir_path	predicatec                 P   t          | t          j                  st          j        |           } g dt          j        f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_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   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   typingUnionr   r   boolr   CallableListr"   r   r   r   <module>r(      s    
			  7W\35F(G 7QT 7Y] 7 7 7 7 kyjx l7<#45BH/SZS_R`bfRfBg[     r   