AlkantarClanX12

Your IP : 18.222.121.24


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/glob.cpython-310.opt-1.pyc

o

6��f��@sdZddlZddlZddlZddlZddlZddlZddlZgd�Zdddd�dd�Z	dddd�dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Ze�d"�Ze�d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zejeed,d�BZ dS)-zFilename globbing utility.�N)�glob�iglob�escapeF��root_dir�dir_fd�	recursivecCstt||||d��S)ayReturn a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    r)�listr)�pathnamerrr�r�+/opt/alt/python310/lib64/python3.10/glob.pyr
srcCs�t�d||�t�d||||�|durt�|�}n|dd�}t||||d�}|r4|rRt|dd��rRzt|�}|rEt�|f|�}W|SW|St	yQY|Sw|S)a�Return an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    z	glob.globzglob.glob/2NrF�)
�sys�audit�os�fspath�_iglob�_isrecursive�next�	itertools�chain�
StopIteration)r
rrr�it�srrrrs&���rc
cs�tj�|�\}}t|�s)|rtt||�|�r|VdStt||�|�r'|VdS|sI|r=t|�r=t||||�EdHdSt	||||�EdHdS||krZt|�rZt
||||d�}n|g}t|�rm|rjt|�rjt}nt	}nt}|D]}|t||�|||�D]
}	tj�||	�Vq}qqdS)NT)
r�path�split�	has_magic�_lexists�_join�_isdirr�_glob2�_glob1r�_glob0�join)
r
rrr�dironly�dirname�basename�dirsZglob_in_dir�namerrrr5s:�����rcCs.t|||�}t|�sdd�|D�}t�||�S)Ncss�|]	}t|�s|VqdS�N)�	_ishidden)�.0�xrrr�	<genexpr>`s�z_glob1.<locals>.<genexpr>)�_listdirr*�fnmatch�filter)r%�patternrr$�namesrrrr!]sr!cCs2|rtt||�|�r
|gSgSt||�r|gSgSr))rrr)r%r&rr$rrrr"cs
�r"cC�t||dd�S�NF)r"�r%r1rrr�glob0p�r6cCr3r4)r!r5rrr�glob1sr7r8ccs&�|dd�Vt|||�EdHdS)Nr)�	_rlistdir)r%r1rr$rrrr ys�r c
cs,�z�d}d}|dur"|rtj|t|d�}}n|}t|t�r!tj}n|r'|}nt|t�r3ttjd�}ntj}zJt�|��-}|D]"}z|rH|��rW|durS||j	�Vn|j	VWq?t
yaYq?wWd�n1slwYW|dur~t�|�WdSWdS|dur�t�|�wwt
y�YdSw)N�r�ASCII)r�open�_dir_open_flags�
isinstance�bytes�fsencode�curdir�scandir�is_dirr(�OSError�close)r%rr$�fdr@�argr�entryrrr�_iterdir�sN�
�
��������rIcCs>t�t|||���}t|�Wd�S1swYdSr))�
contextlib�closingrIr	)r%rr$rrrrr.�s$�r.ccsZ�t|||�}|D]!}t|�s*|V|rt||�n|}t|||�D]}t||�Vq!q	dSr))r.r*rr9)r%rr$r2r,r�yrrrr9�s���r9c	CsB|dur
tj�|�Sz
tj||d�WdSttfy YdSw)Nr:FT)rr�lexists�lstatrD�
ValueError)r
rrrrr�s��rc	CsL|dur
tj�|�Sz	tj||d�}WnttfyYdSwt�|j�S)Nr:F)rr�isdir�statrDrO�S_ISDIR�st_mode)r
r�strrrr�s�rcCs|r|s|p|Stj�||�Sr))rrr#)r%r&rrrr�srz([*?[])s([*?[])cCs.t|t�rt�|�}|duSt�|�}|duSr))r>r?�magic_check_bytes�search�magic_check)r�matchrrrr�s



�rcCs|ddvS)Nr)�.�.r)rrrrr*�sr*cCst|t�r	|dkS|dkS)Ns**z**)r>r?)r1rrrr�s
rcCsBtj�|�\}}t|t�rt�d|�}||St�d|�}||S)z#Escape all special characters.
    s[\1]z[\1])rr�
splitdriver>r?rU�subrW)r
Zdriverrrr�s
�r�O_DIRECTORY)!�__doc__rJr�rer/rrQr�__all__rrrr!r"r6r8r rIr.r9rrr�compilerWrUrr*rr�O_RDONLY�getattrr=rrrr�<module>s<
(
"