403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
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-310.pyc
o

�Q`o�@s�dZddlmZmZddlZddlZddlmZddlm	Z	ej
r/ddlmZmZm
Z
mZmZe	d�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Zddd�ZdS)zMatch wildcard filenames.
�)�unicode_literals�print_functionN)�partial�)�LRUCache)�Callable�Iterable�Text�Tuple�Patterni�cCsXzt|df}Wnty$dt|�d}t�|�t|df<}Ynw|�|�duS)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�res�r�-/usr/lib/python3/dist-packages/fs/wildcard.pyrs�rcCs`zt|df}Wn ty(dt|dd�d}t�|tj�t|df<}Ynw|�|�duS)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_sensitiver
N)rrrrr�
IGNORECASErrrrr�imatch(s�rc�|sdSt�fdd�|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��|]}t|��VqdS�N)r��.0r�rrr�	<genexpr>M��zmatch_any.<locals>.<genexpr>��any��patternsrrr#r�	match_any<�r*cr)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.

    Tc3rr )rr!r#rrr$ar%zimatch_any.<locals>.<genexpr>r&r(rr#r�
imatch_anyPr+r,cCs$|sdd�S|r
tt|�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

    cSsdS)NTrr#rrr�<lambda>|szget_matcher.<locals>.<lambda>)rr*r,)r)rrrr�get_matcherds


r.TcCsV|s|��}dt|�}}d}||kr�||}|d}|dkr$|d}n�|dkr-|d}nx|dkr�|}||krA||d	krA|d}||krO||d
krO|d}||krg||d
krg|d}||krg||d
ksY||krp|d}n5|||��dd
�}|d}|dd	kr�d|dd�}n
|ddkr�d|}d||f}n|t�|�}||ks|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\\�^Nz%s[%s])�lower�len�replacer�escape)rr�i�nr�c�j�stuffrrrr�s@

�
�r)T)�__doc__�
__future__rrr�typing�	functoolsr�lrucacher�
TYPE_CHECKINGrrr	r
rrrrr*r,r.rrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit