HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/docker/utils/__pycache__/fnmatch.cpython-310.pyc
o

�h��@s@dZddlZgd�ZiZdZdd�Zdd�Zd	d
�Zdd�ZdS)
a�Filename matching with shell patterns.

fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.

The functions operate by translating the pattern into a regular
expression.  They cache the compiled regular expressions for speed.

The function translate(PATTERN) returns a regular expression
corresponding to PATTERN.  (It does not compile it.)
�N)�fnmatch�fnmatchcase�	translate�dcCst��dS)zClear the pattern cacheN)�_cache�clear�rr�G/usr/local/CyberCP/lib/python3.10/site-packages/docker/utils/fnmatch.py�_purgesr
cCs|��}|��}t||�S)a�Test whether FILENAME matches PATTERN.

    Patterns are Unix shell style:

    *       matches everything
    ?       matches any single character
    [seq]   matches any character in seq
    [!seq]  matches any char not in seq

    An initial period in FILENAME is not special.
    Both FILENAME and PATTERN are first case-normalized
    if the operating system requires it.
    If you don't want this, use fnmatchcase(FILENAME, PATTERN).
    )�lowerr)�name�patrrr	rs
rcCs\zt|}Wn ty&t|�}tt�tkrt��t�|�t|<}Ynw|�|�duS)z�Test whether FILENAME matches PATTERN, including case.
    This is a version of fnmatch() which doesn't case-normalize
    its arguments.
    N)	r�KeyErrorr�len�	_MAXCACHEr�re�compile�match)rr
�re_pat�resrrr	r/s�rcCs�dt|�}}d}||kr�||}|d}|dkrK||krE||dkrE|d}||kr5||dkr5|d}||kr?|�d�}n�|�d�}n�|�d�}n�|d	krU|�d
�}n}|dkr�|}||kri||dkri|d}||krw||d
krw|d}||kr�||d
kr�|d}||kr�||d
ks�||kr�|�d�}n9|||��dd�}|d}|ddkr�d|dd���}n|ddkr�d|��}|�d|�d
�}n|t�|�}||ks
|�d�S)zfTranslate a shell PATTERN to a regular expression.

    There is no way to quote meta-characters.
    r�^��*�/z.*z(.*/)?z[^/]*�?z[^/]�[�!�]z\[�\z\\N�$)r�replacer�escape)r
�i�nr�c�j�stuffrrr	r?sJ�
�
-r)	�__doc__r�__all__rrr
rrrrrrr	�<module>s